From e700297bfc7949f10df00919459413f2d1da37ef Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 20 May 2024 19:36:36 -0500 Subject: [PATCH] fix faiklling test --- package.json | 11 +- src/handlers/event-utils.ts | 33 ++-- src/handlers/message.ts | 8 +- src/handlers/ready.ts | 2 +- src/types/core-modules.ts | 33 ++-- src/types/core-plugin.ts | 25 +-- src/types/dependencies.d.ts | 1 - test/core/create-plugin.test.ts | 5 - test/handlers/dispatchers.test.ts | 27 ++-- yarn.lock | 253 ++++++++++++------------------ 10 files changed, 152 insertions(+), 246 deletions(-) diff --git a/package.json b/package.json index e985a5a7..fd9c29dd 100644 --- a/package.json +++ b/package.json @@ -46,19 +46,10 @@ "@types/node-cron": "^3.0.11", "@typescript-eslint/eslint-plugin": "5.58.0", "@typescript-eslint/parser": "5.59.1", - "discord.js": "^14.11.0", + "discord.js": "^14.x.x", "eslint": "8.39.0", - "prettier": "2.8.8", "typescript": "5.0.2" }, - "prettier": { - "semi": true, - "trailingComma": "all", - "singleQuote": true, - "printWidth": 100, - "tabWidth": 4, - "arrowParens": "avoid" - }, "eslintConfig": { "parser": "@typescript-eslint/parser", "extends": [ diff --git a/src/handlers/event-utils.ts b/src/handlers/event-utils.ts index edfa9a53..66b47ae7 100644 --- a/src/handlers/event-utils.ts +++ b/src/handlers/event-utils.ts @@ -1,17 +1,8 @@ import type { Interaction, Message, BaseInteraction } from 'discord.js'; import { - EMPTY, - Observable, - concatMap, - filter, - throwError, - fromEvent, - map, - type OperatorFunction, - catchError, - finalize, - pipe, - from, + EMPTY, type Observable, concatMap, filter, + throwError, fromEvent, map, type OperatorFunction, + catchError, finalize, pipe, from, } from 'rxjs'; import * as Id from '../core/id' import type { Emitter } from '../core/interfaces'; @@ -49,7 +40,7 @@ export function eventDispatcher(deps: Dependencies, module: Module, source: unkn `${source} cannot be constructed into an event listener`); const execute: OperatorFunction = concatMap(async args => { - if(args) return module.execute.apply(null, args); + if(args) return Reflect.apply(module.execute, null, args); }); //@ts-ignore return fromEvent(source, module.name!) @@ -81,11 +72,7 @@ export function createDispatcher({ module, event, defaultPrefix, deps }: Dispatc switch (module.type) { case CommandType.Slash: case CommandType.Both: { - return { - module, - args: [Context.wrap(event, defaultPrefix)], - deps - }; + return { module, args: [Context.wrap(event, defaultPrefix)], deps }; } default: return { module, args: [event], deps }; } @@ -198,7 +185,7 @@ export function executeModule( * @returns receiver function for flattening a stream of data */ export function createResultResolver(config: { - onStop?: (module: Module) => unknown; + onStop?: (module: Module, err?: string) => unknown; onNext: (args: ExecutePayload, map: Record) => Output; }) { const { onStop, onNext } = config; @@ -207,7 +194,7 @@ export function createResultResolver(config: { if(task.isOk()) { return onNext(payload, task.value) as Output; } else { - onStop?.(payload.module); + onStop?.(payload.module, String(task.error)); } }; }; @@ -231,7 +218,7 @@ export async function callInitPlugins(module: Module, deps: Dependencies, sEmitt async function callPlugins({ args, module, deps }: ExecutePayload) { let state = {}; for(const plugin of module.onEvent) { - const result = await plugin.execute(...args, { state, deps }); + const result = await plugin.execute(...args, { state, deps, type: module.type === CommandType.Text?'text':'slash' }); if(result.isErr()) { return result; } @@ -248,10 +235,10 @@ async function callPlugins({ args, module, deps }: ExecutePayload) { export function intoTask(onStop: (m: Module) => unknown) { const onNext = ({ args, module, deps }: ExecutePayload, state: Record) => ({ module, - args: [...args, { state, deps }], + args: [...args, { state, deps, type: module.type === CommandType.Text?'text':'slash' }], deps }); - return createResultResolver({ onStop, onNext }) + return createResultResolver({ onStop, onNext }); } export const handleCrash = diff --git a/src/handlers/message.ts b/src/handlers/message.ts index 2739e9d9..193a5304 100644 --- a/src/handlers/message.ts +++ b/src/handlers/message.ts @@ -20,10 +20,8 @@ function hasPrefix(prefix: string, content: string) { return prefixInContent.localeCompare(prefix, undefined, { sensitivity: 'accent' }) === 0; } -export default function ( - deps: UnpackedDependencies, - defaultPrefix?: string -) { +export default +function (deps: UnpackedDependencies, defaultPrefix?: string) { const {"@sern/emitter": emitter, '@sern/logger': log, '@sern/client': client} = deps @@ -38,7 +36,7 @@ export default function ( const msgCommands$ = handle(isNonBot(defaultPrefix)); return msgCommands$.pipe( - filterTap((e) => emitter.emit('warning', resultPayload(PayloadType.Warning, undefined, e))), + filterTap(e => emitter.emit('warning', resultPayload(PayloadType.Warning, undefined, e))), concatMap(intoTask(module => { const result = resultPayload(PayloadType.Failure, module, SernError.PluginFailure); emitter.emit('module.activate', result); diff --git a/src/handlers/ready.ts b/src/handlers/ready.ts index e7cf0106..41c7af3a 100644 --- a/src/handlers/ready.ts +++ b/src/handlers/ready.ts @@ -2,7 +2,7 @@ import * as Files from '../core/module-loading' import { once } from 'events'; import { resultPayload } from '../core/functions'; import { PayloadType } from '..'; -import { CommandType, SernError } from '../core/structures/enums'; +import { CommandType } from '../core/structures/enums'; import { Module } from '../types/core-modules'; import { UnpackedDependencies } from '../types/utility'; import { callInitPlugins } from './event-utils'; diff --git a/src/types/core-modules.ts b/src/types/core-modules.ts index ca618caa..87327456 100644 --- a/src/types/core-modules.ts +++ b/src/types/core-modules.ts @@ -20,10 +20,13 @@ import { Context } from '../core/structures/context' import { AnyPlugin, ControlPlugin, InitPlugin } from './core-plugin'; import { Awaitable, SernEventsMapping } from './utility'; -type ToBeDecided = { +//state, deps, type (very original) +export type SDT = { state: Record; - deps: Dependencies -} + deps: Dependencies; + type: 'slash' | 'text' +}; + export type Processed = T & { name: string; description: string }; export interface Module { @@ -63,47 +66,47 @@ export interface CronEventCommand extends Module { export interface ContextMenuUser extends Module { type: CommandType.CtxUser; - execute: (ctx: UserContextMenuCommandInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: UserContextMenuCommandInteraction, tbd: SDT) => Awaitable; } export interface ContextMenuMsg extends Module { type: CommandType.CtxMsg; - execute: (ctx: MessageContextMenuCommandInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: MessageContextMenuCommandInteraction, tbd: SDT) => Awaitable; } export interface ButtonCommand extends Module { type: CommandType.Button; - execute: (ctx: ButtonInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: ButtonInteraction, tbd: SDT) => Awaitable; } export interface StringSelectCommand extends Module { type: CommandType.StringSelect; - execute: (ctx: StringSelectMenuInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: StringSelectMenuInteraction, tbd: SDT) => Awaitable; } export interface ChannelSelectCommand extends Module { type: CommandType.ChannelSelect; - execute: (ctx: ChannelSelectMenuInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: ChannelSelectMenuInteraction, tbd: SDT) => Awaitable; } export interface RoleSelectCommand extends Module { type: CommandType.RoleSelect; - execute: (ctx: RoleSelectMenuInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: RoleSelectMenuInteraction, tbd: SDT) => Awaitable; } export interface MentionableSelectCommand extends Module { type: CommandType.MentionableSelect; - execute: (ctx: MentionableSelectMenuInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: MentionableSelectMenuInteraction, tbd: SDT) => Awaitable; } export interface UserSelectCommand extends Module { type: CommandType.UserSelect; - execute: (ctx: UserSelectMenuInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: UserSelectMenuInteraction, tbd: SDT) => Awaitable; } export interface ModalSubmitCommand extends Module { type: CommandType.Modal; - execute: (ctx: ModalSubmitInteraction, tbd: ToBeDecided) => Awaitable; + execute: (ctx: ModalSubmitInteraction, tbd: SDT) => Awaitable; } export interface AutocompleteCommand { @@ -119,21 +122,21 @@ export interface DiscordEventCommand Awaitable; + execute: (ctx: Context, tbd: SDT) => Awaitable; } export interface SlashCommand extends Module { type: CommandType.Slash; description: string; options?: SernOptionsData[]; - execute: (ctx: Context, tbd: ToBeDecided) => Awaitable; + execute: (ctx: Context, tbd: SDT) => Awaitable; } export interface BothCommand extends Module { type: CommandType.Both; description: string; options?: SernOptionsData[]; - execute: (ctx: Context, tbd: ToBeDecided) => Awaitable; + execute: (ctx: Context, tbd: SDT) => Awaitable; } export type EventModule = DiscordEventCommand | SernEventCommand | ExternalEventCommand | CronEventCommand; diff --git a/src/types/core-plugin.ts b/src/types/core-plugin.ts index d0bc067c..60c0b03d 100644 --- a/src/types/core-plugin.ts +++ b/src/types/core-plugin.ts @@ -15,6 +15,7 @@ import type { Err, Ok, Result } from 'ts-results-es'; import type { Module, Processed, + SDT, } from './core-modules'; import type { Awaitable } from './utility'; import type { CommandType, PluginType } from '../core/structures/enums' @@ -62,16 +63,16 @@ export type AnyPlugin = ControlPlugin | InitPlugin<[InitArgs>] export type CommandArgs = CommandArgsMatrix[I] interface CommandArgsMatrix { - [CommandType.Text]: [Context]; - [CommandType.Slash]: [Context]; - [CommandType.Both]: [Context]; - [CommandType.CtxMsg]: [MessageContextMenuCommandInteraction]; - [CommandType.CtxUser]: [UserContextMenuCommandInteraction]; - [CommandType.Button]: [ButtonInteraction]; - [CommandType.StringSelect]: [StringSelectMenuInteraction]; - [CommandType.RoleSelect]: [RoleSelectMenuInteraction]; - [CommandType.ChannelSelect]: [ChannelSelectMenuInteraction]; - [CommandType.MentionableSelect]: [MentionableSelectMenuInteraction]; - [CommandType.UserSelect]: [UserSelectMenuInteraction]; - [CommandType.Modal]: [ModalSubmitInteraction]; + [CommandType.Text]: [Context, SDT]; + [CommandType.Slash]: [Context, SDT]; + [CommandType.Both]: [Context, SDT]; + [CommandType.CtxMsg]: [MessageContextMenuCommandInteraction, SDT]; + [CommandType.CtxUser]: [UserContextMenuCommandInteraction, SDT]; + [CommandType.Button]: [ButtonInteraction, SDT]; + [CommandType.StringSelect]: [StringSelectMenuInteraction, SDT]; + [CommandType.RoleSelect]: [RoleSelectMenuInteraction, SDT]; + [CommandType.ChannelSelect]: [ChannelSelectMenuInteraction, SDT]; + [CommandType.MentionableSelect]: [MentionableSelectMenuInteraction, SDT]; + [CommandType.UserSelect]: [UserSelectMenuInteraction, SDT]; + [CommandType.Modal]: [ModalSubmitInteraction, SDT]; } diff --git a/src/types/dependencies.d.ts b/src/types/dependencies.d.ts index cf0fd9bf..ecc76d5d 100644 --- a/src/types/dependencies.d.ts +++ b/src/types/dependencies.d.ts @@ -8,6 +8,5 @@ import { CoreDependencies } from './ioc'; declare global { interface Dependencies extends CoreDependencies {} - } diff --git a/test/core/create-plugin.test.ts b/test/core/create-plugin.test.ts index 37199e81..5236a61b 100644 --- a/test/core/create-plugin.test.ts +++ b/test/core/create-plugin.test.ts @@ -2,17 +2,12 @@ import { describe, it, expect } from 'vitest'; import { CommandControlPlugin, CommandInitPlugin, - EventControlPlugin, EventInitPlugin, } from '../../src/core/create-plugins'; import { PluginType, controller } from '../../src'; describe('create-plugins', () => { it('should make proper control plugins', () => { - const pl = EventControlPlugin(() => controller.next()); - expect(pl).to.have.all.keys(['type', 'execute']); - expect(pl.type).toBe(PluginType.Control); - expect(pl.execute).an('function'); const pl2 = CommandControlPlugin(() => controller.next()); expect(pl2).to.have.all.keys(['type', 'execute']); expect(pl2.type).toBe(PluginType.Control); diff --git a/test/handlers/dispatchers.test.ts b/test/handlers/dispatchers.test.ts index e9a1544d..325eff38 100644 --- a/test/handlers/dispatchers.test.ts +++ b/test/handlers/dispatchers.test.ts @@ -1,7 +1,6 @@ import { beforeEach, describe, expect, vi, it } from 'vitest'; import { eventDispatcher } from '../../src/handlers/event-utils'; import { faker } from '@faker-js/faker'; -import { TestScheduler } from 'rxjs/testing'; import { Module } from '../../src/types/core-modules'; import { Processed } from '../../src/types/core-modules'; import { EventEmitter } from 'events'; @@ -19,12 +18,13 @@ function createRandomModule(): Processed { }; } -const testScheduler = new TestScheduler((actual, expected) => { - // asserting the two objects are equal - required - // for TestScheduler assertions to work via your test framework - // e.g. using chai. - expect(actual).deep.equal(expected); -}); +function mockDeps() { + return { + '@sern/client': {} + } +} + + describe('eventDispatcher standard', () => { let m: Processed; @@ -35,19 +35,10 @@ describe('eventDispatcher standard', () => { }); it('should throw', () => { - expect(() => eventDispatcher(m, 'not event emitter')).toThrowError(); + expect(() => eventDispatcher(mockDeps(), m, 'not event emitter')).toThrowError(); }); it("Shouldn't throw", () => { - expect(() => eventDispatcher(m, ee)).not.toThrowError(); + expect(() => eventDispatcher(mockDeps(), m, ee)).not.toThrowError(); }); - //TODO -// it('Should be called once', () => { -// const s = eventDispatcher(m, ee); -// console.log(m) -// s.subscribe(); -// ee.emit(m.name); -// console.log(m.execute) -// expect(m.execute).toHaveBeenCalledOnce(); -// }); }); diff --git a/yarn.lock b/yarn.lock index 25b4e639..13daa980 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,18 +12,18 @@ __metadata: languageName: node linkType: hard -"@discordjs/builders@npm:^1.7.0": - version: 1.7.0 - resolution: "@discordjs/builders@npm:1.7.0" - dependencies: - "@discordjs/formatters": ^0.3.3 - "@discordjs/util": ^1.0.2 - "@sapphire/shapeshift": ^3.9.3 - discord-api-types: 0.37.61 +"@discordjs/builders@npm:^1.8.1": + version: 1.8.1 + resolution: "@discordjs/builders@npm:1.8.1" + dependencies: + "@discordjs/formatters": ^0.4.0 + "@discordjs/util": ^1.1.0 + "@sapphire/shapeshift": ^3.9.7 + discord-api-types: 0.37.83 fast-deep-equal: ^3.1.3 - ts-mixer: ^6.0.3 + ts-mixer: ^6.0.4 tslib: ^2.6.2 - checksum: 837e7643fc8396e4914bbbfbbfa1232ab7109c931884e8df45cd7356944633590f710a18513d30a10de1b6686ed5166df702bde0c4511fb0cbcac897edd9e56a + checksum: 21e826004ddddf6f9717cbdacafe4ff748d03103634d82883c66f605b068a5ae12a952aaa2558a2c21f3ec717427a12bb9b57f0f8670f8a4ab6a0757bb3b229d languageName: node linkType: hard @@ -34,60 +34,60 @@ __metadata: languageName: node linkType: hard -"@discordjs/collection@npm:^2.0.0": - version: 2.0.0 - resolution: "@discordjs/collection@npm:2.0.0" - checksum: c2d05fa2b9a27bb64e93e2836bbe44c835d21f85e28cd934f6e2a81fef423ab0415968cca9d066b83347539edc8ea9afa8075d80bd62594e39f09eb881052c49 +"@discordjs/collection@npm:^2.1.0": + version: 2.1.0 + resolution: "@discordjs/collection@npm:2.1.0" + checksum: ebe1a32769296f14a38b2c718c7e0d00830e37e68e59a3683aa0f7c25adf9487ebaca3ac3f78fd60e2c89cf314b7891312cac36e3b0885cceb4d2a677ae7d19b languageName: node linkType: hard -"@discordjs/formatters@npm:^0.3.3": - version: 0.3.3 - resolution: "@discordjs/formatters@npm:0.3.3" +"@discordjs/formatters@npm:^0.4.0": + version: 0.4.0 + resolution: "@discordjs/formatters@npm:0.4.0" dependencies: - discord-api-types: 0.37.61 - checksum: a844628094a6effa8ac4e4a4ea9082d5c89e6cae6bbd18e60abd410769e5ea18f64aa2db8623aa3c8c572084368f6c2e27cc2d72af640aff5e4ee7fc42132c60 + discord-api-types: 0.37.83 + checksum: 130ab7ba104635d7d0f92f4c3de67dbc60cdab004e9db605e0f2c7f410a9808df8776e4d5d45632597dc7257713dc77bb616ee25bb0827117247b6bebfe35921 languageName: node linkType: hard -"@discordjs/rest@npm:^2.1.0": - version: 2.2.0 - resolution: "@discordjs/rest@npm:2.2.0" - dependencies: - "@discordjs/collection": ^2.0.0 - "@discordjs/util": ^1.0.2 - "@sapphire/async-queue": ^1.5.0 - "@sapphire/snowflake": ^3.5.1 - "@vladfrangu/async_event_emitter": ^2.2.2 - discord-api-types: 0.37.61 - magic-bytes.js: ^1.5.0 +"@discordjs/rest@npm:^2.3.0": + version: 2.3.0 + resolution: "@discordjs/rest@npm:2.3.0" + dependencies: + "@discordjs/collection": ^2.1.0 + "@discordjs/util": ^1.1.0 + "@sapphire/async-queue": ^1.5.2 + "@sapphire/snowflake": ^3.5.3 + "@vladfrangu/async_event_emitter": ^2.2.4 + discord-api-types: 0.37.83 + magic-bytes.js: ^1.10.0 tslib: ^2.6.2 - undici: 5.27.2 - checksum: 29a14ecf3282ae3306883f1f6c870693d0ecacd080c5b66a72e31487a8070655807a80a8bf09bebea4f73e631439abc5121dfa38016ca0ccbe3f68c0f7ffc80e + undici: 6.13.0 + checksum: 01564bf108c359f5650318ccadc51bf762c99df56de865192b25adef4331c0729886e84b4ebd10dfc57818b97ff891f1857873811e7a2326d24fd0bf892a0201 languageName: node linkType: hard -"@discordjs/util@npm:^1.0.2": - version: 1.0.2 - resolution: "@discordjs/util@npm:1.0.2" - checksum: 320d7e125981001160d413ae56e76e60447dce102010b80e3b1b16d885be765df5ae2551aa79fdc4d435a82361ed72246b44251f0c1f7a8fef7056a4481d5609 +"@discordjs/util@npm:^1.1.0": + version: 1.1.0 + resolution: "@discordjs/util@npm:1.1.0" + checksum: b4db3fc6017986cd0e7fd6aa50e890e1259e79c6e0ff9c07685a86b2c22409a42f146f282d907885444f37ca596220c166d8be11851fab7f9e2c1ee932fd524e languageName: node linkType: hard -"@discordjs/ws@npm:^1.0.2": - version: 1.0.2 - resolution: "@discordjs/ws@npm:1.0.2" - dependencies: - "@discordjs/collection": ^2.0.0 - "@discordjs/rest": ^2.1.0 - "@discordjs/util": ^1.0.2 - "@sapphire/async-queue": ^1.5.0 - "@types/ws": ^8.5.9 - "@vladfrangu/async_event_emitter": ^2.2.2 - discord-api-types: 0.37.61 +"@discordjs/ws@npm:^1.1.0": + version: 1.1.0 + resolution: "@discordjs/ws@npm:1.1.0" + dependencies: + "@discordjs/collection": ^2.1.0 + "@discordjs/rest": ^2.3.0 + "@discordjs/util": ^1.1.0 + "@sapphire/async-queue": ^1.5.2 + "@types/ws": ^8.5.10 + "@vladfrangu/async_event_emitter": ^2.2.4 + discord-api-types: 0.37.83 tslib: ^2.6.2 - ws: ^8.14.2 - checksum: 2564d3ff00d04d7638955c8c9a9f6234c50168fbe8243140bc458dc9ffa39ad5063e7d5762cdce71bb8bcf70b6353c28b8531e40f54568706898e92bc8748590 + ws: ^8.16.0 + checksum: a187977572f028d0d92bed16e25ad0b4cb86025372a5f632a15a00d3d0c8ad27a264530c364fee2ca6e5f3637ccf970b8af3e6009ec5ad193d2f3211ab70a133 languageName: node linkType: hard @@ -140,13 +140,6 @@ __metadata: languageName: node linkType: hard -"@fastify/busboy@npm:^2.0.0": - version: 2.1.0 - resolution: "@fastify/busboy@npm:2.1.0" - checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 - languageName: node - linkType: hard - "@humanwhocodes/config-array@npm:^0.11.8": version: 0.11.11 resolution: "@humanwhocodes/config-array@npm:0.11.11" @@ -199,34 +192,27 @@ __metadata: languageName: node linkType: hard -"@sapphire/async-queue@npm:^1.5.0": - version: 1.5.0 - resolution: "@sapphire/async-queue@npm:1.5.0" - checksum: 983dbd1fd1b1798496e5edb6a0db7e4d90015160e1028f20475eab0a92625513f1e8d938bc0305811a9cec461c94e01b1e4191615ff03ba49356f568f3255250 +"@sapphire/async-queue@npm:^1.5.2": + version: 1.5.2 + resolution: "@sapphire/async-queue@npm:1.5.2" + checksum: 6252e72254f33c91da4887e324f17b59708b12c603216cc45f001460fd33265844301de47ab67c8caf8383ee280b39c8427ede242bd3b50b6ccdf13a386a5f1b languageName: node linkType: hard -"@sapphire/shapeshift@npm:^3.9.3": - version: 3.9.4 - resolution: "@sapphire/shapeshift@npm:3.9.4" +"@sapphire/shapeshift@npm:^3.9.7": + version: 3.9.7 + resolution: "@sapphire/shapeshift@npm:3.9.7" dependencies: fast-deep-equal: ^3.1.3 lodash: ^4.17.21 - checksum: 680a06823f899753c230d676a0c4c4b45e5575329d3598fb243dd5777c491955a62dcba94aac35770327a5a1103ddee6ceb8fa99c6b88de3cdd313fe3bafb2d3 - languageName: node - linkType: hard - -"@sapphire/snowflake@npm:3.5.1": - version: 3.5.1 - resolution: "@sapphire/snowflake@npm:3.5.1" - checksum: 8fc025020adab1a7a1a5d2cf07704d598cc1977b50e5fcd3a5dd239f00934dc936d3a4d5ae336e71d8bf1d88ec27aa814b34de79e38ff097b7b9ba5a7977a683 + checksum: a36032ff8fc54056ea21e0cdbbea84c3d80c0c0fb19b2685e14e29111ab9c1172c9273e1e54d49e2a62ba5a393f18b3dab9330d34b97d3519d572e32dd64913d languageName: node linkType: hard -"@sapphire/snowflake@npm:^3.5.1": - version: 3.5.2 - resolution: "@sapphire/snowflake@npm:3.5.2" - checksum: f88ee6b167abd83868092b71d68ad36599e922948d1b77ba694c1e13afafc46d4b07914d86ad5af6841cb4b95ceaffd940affe56576362a1c7a5d28a4344f3e4 +"@sapphire/snowflake@npm:3.5.3, @sapphire/snowflake@npm:^3.5.3": + version: 3.5.3 + resolution: "@sapphire/snowflake@npm:3.5.3" + checksum: 821add76877e2786ddb1b5cd3ee5de130610b82014972d91a99b4b7ce5475839b9a26f94de322f48a66f9ba2e2c578ffe46a60d06cbb9a36fd8fb96ef78be248 languageName: node linkType: hard @@ -240,10 +226,9 @@ __metadata: "@typescript-eslint/eslint-plugin": 5.58.0 "@typescript-eslint/parser": 5.59.1 callsites: ^3.1.0 - discord.js: ^14.11.0 + discord.js: ^14.x.x eslint: 8.39.0 node-cron: ^3.0.3 - prettier: 2.8.8 rxjs: ^7.8.0 ts-results-es: ^4.1.0 typescript: 5.0.2 @@ -264,14 +249,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": - version: 20.5.9 - resolution: "@types/node@npm:20.5.9" - checksum: 717490e94131722144878b4ca1a963ede1673bb8f2ef78c2f5b50b918df6dc9b35e7f8283e5c2a7a9f137730f7c08dc6228e53d4494a94c9ee16881e6ce6caed - languageName: node - linkType: hard - -"@types/node@npm:^20.0.0": +"@types/node@npm:*, @types/node@npm:^20.0.0": version: 20.12.12 resolution: "@types/node@npm:20.12.12" dependencies: @@ -287,16 +265,7 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:8.5.9": - version: 8.5.9 - resolution: "@types/ws@npm:8.5.9" - dependencies: - "@types/node": "*" - checksum: 83f436b731d2cdc49a45ced31a0a65cdd2e39c24d7b882776c26efa190dad6553e266d624c7a7089f36ad3ed471e02e729f3219282c80689b435f665df4a2b0b - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.9": +"@types/ws@npm:^8.5.10": version: 8.5.10 resolution: "@types/ws@npm:8.5.10" dependencies: @@ -471,7 +440,7 @@ __metadata: languageName: node linkType: hard -"@vladfrangu/async_event_emitter@npm:^2.2.2": +"@vladfrangu/async_event_emitter@npm:^2.2.4": version: 2.2.4 resolution: "@vladfrangu/async_event_emitter@npm:2.2.4" checksum: ff65ebc4d89639adecd249e24e4f6f97b7696404f2a4461160efdff628d91de543e982727c18de62a4edada3f66381b5a3cd1d4f4f33098075d839c1b4f46979 @@ -643,32 +612,30 @@ __metadata: languageName: node linkType: hard -"discord-api-types@npm:0.37.61": - version: 0.37.61 - resolution: "discord-api-types@npm:0.37.61" - checksum: fe33d528e31a6de0bab2afb43d0e058957a6da6cfc4d797943fac83aeb8d07543dc0f85cad3c4e6789cbbac0c7ca49dae5ac465224b129c7acb716097fa0b081 +"discord-api-types@npm:0.37.83": + version: 0.37.83 + resolution: "discord-api-types@npm:0.37.83" + checksum: ab2a31188352d9c742f09a114a95322e7f7de90199cb9f5571f7f5ac25765e7abc9b83c15c14d513ffc5e1d63d9e3ea5ff088fa8a1c5d9c1e1f395b27027cef0 languageName: node linkType: hard -"discord.js@npm:^14.11.0": - version: 14.14.1 - resolution: "discord.js@npm:14.14.1" +"discord.js@npm:^14.x.x": + version: 14.15.2 + resolution: "discord.js@npm:14.15.2" dependencies: - "@discordjs/builders": ^1.7.0 + "@discordjs/builders": ^1.8.1 "@discordjs/collection": 1.5.3 - "@discordjs/formatters": ^0.3.3 - "@discordjs/rest": ^2.1.0 - "@discordjs/util": ^1.0.2 - "@discordjs/ws": ^1.0.2 - "@sapphire/snowflake": 3.5.1 - "@types/ws": 8.5.9 - discord-api-types: 0.37.61 + "@discordjs/formatters": ^0.4.0 + "@discordjs/rest": ^2.3.0 + "@discordjs/util": ^1.1.0 + "@discordjs/ws": ^1.1.0 + "@sapphire/snowflake": 3.5.3 + discord-api-types: 0.37.83 fast-deep-equal: 3.1.3 lodash.snakecase: 4.1.1 tslib: 2.6.2 - undici: 5.27.2 - ws: 8.14.2 - checksum: 651e61861ae33e6ec3903e72a8bf229caae5dab73f8d409c3673430cafd9c438a0dd59983242bdcff47bab50da39f7a04da5b586c35b396c102e8e87637076e5 + undici: 6.13.0 + checksum: a6ff7f014996fbea36f7fc7a8ce03f31ded8f3f434ba6c96173721d1d0e18963fcf59c4f00298fd2f01f523bf578582843f80bd99328bade5c4e2b31f82ae368 languageName: node linkType: hard @@ -1155,10 +1122,10 @@ __metadata: languageName: node linkType: hard -"magic-bytes.js@npm:^1.5.0": - version: 1.7.0 - resolution: "magic-bytes.js@npm:1.7.0" - checksum: c36cc3fa828ff27fc752998593dde7be8083b3608e0acec3b5091221fdea2d43b16c13ed368d5c406a120eb3812bcfe060d0aec5919e711ea780088c5b379050 +"magic-bytes.js@npm:^1.10.0": + version: 1.10.0 + resolution: "magic-bytes.js@npm:1.10.0" + checksum: c10e7fc3fe584e4b0767554fb6a12dfc4a9db0782d5005cbdd46bc9b36a8bb420f5266a4b02e089ea4db587937fde289ea467a7a379ad969fb906bf4a0ec3f38 languageName: node linkType: hard @@ -1310,15 +1277,6 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.8.8": - version: 2.8.8 - resolution: "prettier@npm:2.8.8" - bin: - prettier: bin-prettier.js - checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 - languageName: node - linkType: hard - "punycode@npm:^2.1.0": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -1451,10 +1409,10 @@ __metadata: languageName: node linkType: hard -"ts-mixer@npm:^6.0.3": - version: 6.0.3 - resolution: "ts-mixer@npm:6.0.3" - checksum: 7fbaba0a413bf817835a6a23d46bccf4192dd4d7345b6bae9d594c88acffac35bf4995ef3cce753090c8abcdf2afd16dba8899365584a1f960ccc2a15bf2e2d6 +"ts-mixer@npm:^6.0.4": + version: 6.0.4 + resolution: "ts-mixer@npm:6.0.4" + checksum: 36b1af526befd74345e736e9aa16f5c28876ebcea07784da14d929149fd7e6028cfd2fe9304c8efe8cb91b588443a9cc9e991df58e4c6e602326edbaae2af3ab languageName: node linkType: hard @@ -1533,12 +1491,10 @@ __metadata: languageName: node linkType: hard -"undici@npm:5.27.2": - version: 5.27.2 - resolution: "undici@npm:5.27.2" - dependencies: - "@fastify/busboy": ^2.0.0 - checksum: 22bbdd763798700979986546d70072b67223189353d2a811efa9c6e44476161a0d1781ffe24115221f69a1b344b95d5926bd39a6eb760a2cd8804781cec0c5eb +"undici@npm:6.13.0": + version: 6.13.0 + resolution: "undici@npm:6.13.0" + checksum: 47495e93aceeab18664678b6fb0ea2395b7c13a33d2ed4f7f36eb9be9ec5cd6f8e3a4ddaec18127da5e2012e5d7666ca824c7dc70af606dcfe6fdb8441ee3a7a languageName: node linkType: hard @@ -1578,24 +1534,9 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.14.2": - version: 8.14.2 - resolution: "ws@npm:8.14.2" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 3ca0dad26e8cc6515ff392b622a1467430814c463b3368b0258e33696b1d4bed7510bc7030f7b72838b9fdeb8dbd8839cbf808367d6aae2e1d668ce741d4308b - languageName: node - linkType: hard - -"ws@npm:^8.14.2": - version: 8.15.1 - resolution: "ws@npm:8.15.1" +"ws@npm:^8.16.0": + version: 8.17.0 + resolution: "ws@npm:8.17.0" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -1604,7 +1545,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b + checksum: 147ef9eab0251364e1d2c55338ad0efb15e6913923ccbfdf20f7a8a6cb8f88432bcd7f4d8f66977135bfad35575644f9983201c1a361019594a4e53977bf6d4e languageName: node linkType: hard