From f8bde359ce77b5ae6a06c9f7ac0cbeb7ba5f4af6 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 19:04:15 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- .../commands/internal/Ping/internal/Ping.class.ts | 6 +++++- .../internal/Ping/internal/funcs/getRTT/index.ts | 1 + .../internal/funcs/getRTT/internal/getRTT.spec.ts | 13 +++++++++++++ .../Ping/internal/funcs/getRTT/internal/getRTT.ts | 10 ++++++++++ 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/features/commands/internal/Ping/internal/funcs/getRTT/index.ts create mode 100644 src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.spec.ts create mode 100644 src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.ts diff --git a/package.json b/package.json index 4a24022e..616eceff 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "build": "swc ./src -s -d ./dist", "dev": "tsx src/index.ts --watch", "lint": "eslint --ext .js,.ts \"./src/**/*.{js,ts}\"", - "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js" + "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js", + "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch" }, "keywords": [], "author": "", diff --git a/src/features/commands/internal/Ping/internal/Ping.class.ts b/src/features/commands/internal/Ping/internal/Ping.class.ts index 443320db..584554ca 100644 --- a/src/features/commands/internal/Ping/internal/Ping.class.ts +++ b/src/features/commands/internal/Ping/internal/Ping.class.ts @@ -1,3 +1,4 @@ +import { getRTT } from './funcs/getRTT/index.js'; import type { InteractArgs } from '../../CommandBase/index.js'; import { CommandBase } from '../../CommandBase/index.js'; @@ -7,7 +8,10 @@ export class Ping extends CommandBase { public override async interact({ interaction }: InteractArgs): Promise { interaction.reply( - `RTT: ${new Date().getTime() - interaction.createdAt.getTime()}ms` + `RTT: ${getRTT({ + serverTime: interaction.createdAt.getTime(), + localTime: Date.now(), + })}ms` ); return; diff --git a/src/features/commands/internal/Ping/internal/funcs/getRTT/index.ts b/src/features/commands/internal/Ping/internal/funcs/getRTT/index.ts new file mode 100644 index 00000000..8c2fd971 --- /dev/null +++ b/src/features/commands/internal/Ping/internal/funcs/getRTT/index.ts @@ -0,0 +1 @@ +export { getRTT } from './internal/getRTT.js'; diff --git a/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.spec.ts b/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.spec.ts new file mode 100644 index 00000000..9a3e02ef --- /dev/null +++ b/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.spec.ts @@ -0,0 +1,13 @@ +import { getRTT } from './getRTT.js'; + +describe('getRTT', () => { + it('should return the correct RTT', () => { + const localTime = 1000; + const serverTime = 500; + const expectedRTT = localTime - serverTime; + + const result = getRTT({ localTime, serverTime }); + + expect(result).toBe(expectedRTT); + }); +}); diff --git a/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.ts b/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.ts new file mode 100644 index 00000000..673ce327 --- /dev/null +++ b/src/features/commands/internal/Ping/internal/funcs/getRTT/internal/getRTT.ts @@ -0,0 +1,10 @@ +// ローカルタイム-サーバタイムの引き算をする +export const getRTT = ({ + localTime, + serverTime, +}: { + localTime: number; + serverTime: number; +}): number => { + return localTime - serverTime; +}; From d15a9a379be2a2fccc44bc6d608de3618ca3eafb Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 19:10:53 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/Ping/internal/Ping.class.spec.ts | 32 +++++++++++++++++++ src/features/library/index.ts | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/features/commands/internal/Ping/internal/Ping.class.spec.ts diff --git a/src/features/commands/internal/Ping/internal/Ping.class.spec.ts b/src/features/commands/internal/Ping/internal/Ping.class.spec.ts new file mode 100644 index 00000000..9a4c8fb2 --- /dev/null +++ b/src/features/commands/internal/Ping/internal/Ping.class.spec.ts @@ -0,0 +1,32 @@ +import type { + CacheType, + ChatInputCommandInteraction, +} from '@/features/library/index.js'; + +import { Ping } from './Ping.class.js'; + +describe('Ping', () => { + let ping: Ping; + + beforeEach(() => { + ping = new Ping(); + }); + + describe('interact', () => { + it('should reply with the RTT in milliseconds', async () => { + const interaction = { + createdAt: new Date('2022-01-01T00:00:00.000Z'), + reply: jest.fn(), + } as unknown as Readonly>; + const expectedRTT = 100; + + jest + .spyOn(Date, 'now') + .mockReturnValueOnce(new Date('2022-01-01T00:00:00.100Z').getTime()); + + await ping.interact({ interaction }); + + expect(interaction.reply).toHaveBeenCalledWith(`RTT: ${expectedRTT}ms`); + }); + }); +}); diff --git a/src/features/library/index.ts b/src/features/library/index.ts index 4046da8d..93cd7180 100644 --- a/src/features/library/index.ts +++ b/src/features/library/index.ts @@ -6,3 +6,4 @@ export { GatewayIntentBits, ChatInputCommandInteraction, } from 'discord.js'; +export type { CacheType } from 'discord.js'; From eb6c97b4e793843ac57a20d9635c50fa7cea56bf Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 19:12:04 +0900 Subject: [PATCH 3/8] =?UTF-8?q?=E3=82=AB=E3=83=90=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=82=B8=E5=90=90=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c8c3a053..701b8cdf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules +coverage dist/ .env diff --git a/package.json b/package.json index 616eceff..c80e5b60 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "swc ./src -s -d ./dist", "dev": "tsx src/index.ts --watch", "lint": "eslint --ext .js,.ts \"./src/**/*.{js,ts}\"", - "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js", + "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage", "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch" }, "keywords": [], From 76430ef190344130470bda37f74b4b2b6d17093e Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 19:15:48 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=E3=82=AB=E3=83=90=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=82=B8=E7=A8=BC=E3=81=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/CommandBase.class.spec.ts | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/features/commands/internal/CommandBase/internal/CommandBase.class.spec.ts diff --git a/src/features/commands/internal/CommandBase/internal/CommandBase.class.spec.ts b/src/features/commands/internal/CommandBase/internal/CommandBase.class.spec.ts new file mode 100644 index 00000000..f6dbe6af --- /dev/null +++ b/src/features/commands/internal/CommandBase/internal/CommandBase.class.spec.ts @@ -0,0 +1,45 @@ +import type { + CacheType, + ChatInputCommandInteraction, +} from '@/features/library/index.js'; + +import { CommandBase } from './CommandBase.class.js'; + +describe('CommandBase', () => { + class TestCommand extends CommandBase { + public readonly name = 'test'; + public readonly description = 'test command'; + + public async interact(): Promise { + // do nothing + } + } + + let command: TestCommand; + + beforeEach(() => { + command = new TestCommand(); + }); + + describe('register', () => { + it('should return the command instance', () => { + expect(command.register()).toBe(command); + }); + }); + + describe('isInteract', () => { + it('should return true if the interaction command name matches the command name', () => { + const interaction = { commandName: 'test' } as Readonly< + ChatInputCommandInteraction + >; + expect(command.isInteract({ interaction })).toBe(true); + }); + + it('should return false if the interaction command name does not match the command name', () => { + const interaction = { commandName: 'other' } as Readonly< + ChatInputCommandInteraction + >; + expect(command.isInteract({ interaction })).toBe(false); + }); + }); +}); From 79840a4664cd3e094ac1da087166f7e621068a81 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 19:28:40 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E5=A2=97?= =?UTF-8?q?=E3=82=84=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../config/internal/getConfig.spec.ts | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/features/config/internal/getConfig.spec.ts diff --git a/package.json b/package.json index c80e5b60..efe2a207 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "swc ./src -s -d ./dist", "dev": "tsx src/index.ts --watch", "lint": "eslint --ext .js,.ts \"./src/**/*.{js,ts}\"", - "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage", + "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage --silent", "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch" }, "keywords": [], diff --git a/src/features/config/internal/getConfig.spec.ts b/src/features/config/internal/getConfig.spec.ts new file mode 100644 index 00000000..3a8e61dd --- /dev/null +++ b/src/features/config/internal/getConfig.spec.ts @@ -0,0 +1,49 @@ +import { getConfig } from './getConfig.js'; + +describe('getConfig', () => { + const originalProcessEnv = process.env; + + beforeEach(() => { + jest.resetModules(); + process.env = { ...originalProcessEnv }; + }); + + afterEach(() => { + process.env = originalProcessEnv; + }); + + it('should return the expected config', () => { + process.env['DISCORD_APP_TOKEN'] = 'test_token'; + process.env['BOT_NAME'] = 'test_bot'; + process.env['SET_COMMANDS_TARGET_SERVERS'] = 'server1,server2'; + + const expectedConfig = { + DISCORD_APP_TOKEN: 'test_token', + BOT_NAME: 'test_bot', + SET_COMMANDS_TARGET_SERVERS: ['server1', 'server2'], + }; + + expect(getConfig()).toEqual(expectedConfig); + }); + + it('should throw an error if DISCORD_APP_TOKEN is not set', () => { + process.env['BOT_NAME'] = 'test_bot'; + process.env['SET_COMMANDS_TARGET_SERVERS'] = 'server1,server2'; + + expect(getConfig).toThrow(); + }); + + it('should throw an error if BOT_NAME is not set', () => { + process.env['DISCORD_APP_TOKEN'] = 'test_token'; + process.env['SET_COMMANDS_TARGET_SERVERS'] = 'server1,server2'; + + expect(getConfig).toThrow(); + }); + + it('should throw an error if SET_COMMANDS_TARGET_SERVERS is not set', () => { + process.env['DISCORD_APP_TOKEN'] = 'test_token'; + process.env['BOT_NAME'] = 'test_bot'; + + expect(getConfig).toThrow(); + }); +}); From 0ed3ff5187c3fb641adea4499bd4d4c8708d4b05 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 21:07:15 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index efe2a207..4af413da 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "3.0.0-beta1", "description": "", "type": "module", - "main": "index.js", + "main": "dist/index.js", "scripts": { "start": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"./loader.mjs\", pathToFileURL(\"./\"));' dist/index.js", "build": "swc ./src -s -d ./dist", From 39fe48e9d41f28aceeadb21f651045f50c865dc9 Mon Sep 17 00:00:00 2001 From: na2na-p Date: Sun, 12 Nov 2023 21:08:32 +0900 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b399039..a77b5b4d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1994,7 +1994,7 @@ packages: supports-color: optional: true dependencies: - ms: 2.1.2 + ms: 2.1.3 dev: true /debug@4.3.4: @@ -3729,6 +3729,10 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + /ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: true + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} From 630cff77d00c678aadc149a6d561ddb3e9025a6f Mon Sep 17 00:00:00 2001 From: na2na-p Date: Mon, 13 Nov 2023 11:01:18 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 106 ++++++++++++++++++++++++------------------------- 2 files changed, 53 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 4af413da..39b7461b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@t3-oss/env-core": "^0.7.1", "chalk": "^5.3.0", - "discord.js": "^14.13.0", + "discord.js": "^14.14.1", "dotenv": "^16.3.1", "eslint": "^8.53.0", "resolve": "^1.22.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a77b5b4d..d8fe1769 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^5.3.0 version: 5.3.0 discord.js: - specifier: ^14.13.0 - version: 14.13.0 + specifier: ^14.14.1 + version: 14.14.1 dotenv: specifier: ^16.3.1 version: 16.3.1 @@ -420,14 +420,14 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@discordjs/builders@1.6.5: - resolution: {integrity: sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==} + /@discordjs/builders@1.7.0: + resolution: {integrity: sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==} engines: {node: '>=16.11.0'} dependencies: - '@discordjs/formatters': 0.3.2 - '@discordjs/util': 1.0.1 + '@discordjs/formatters': 0.3.3 + '@discordjs/util': 1.0.2 '@sapphire/shapeshift': 3.9.3 - discord-api-types: 0.37.50 + discord-api-types: 0.37.61 fast-deep-equal: 3.1.3 ts-mixer: 6.0.3 tslib: 2.6.2 @@ -438,44 +438,49 @@ packages: engines: {node: '>=16.11.0'} dev: false - /@discordjs/formatters@0.3.2: - resolution: {integrity: sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==} + /@discordjs/collection@2.0.0: + resolution: {integrity: sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==} + engines: {node: '>=18'} + dev: false + + /@discordjs/formatters@0.3.3: + resolution: {integrity: sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==} engines: {node: '>=16.11.0'} dependencies: - discord-api-types: 0.37.50 + discord-api-types: 0.37.61 dev: false - /@discordjs/rest@2.0.1: - resolution: {integrity: sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==} + /@discordjs/rest@2.1.0: + resolution: {integrity: sha512-5gFWFkZX2JCFSRzs8ltx8bWmyVi0wPMk6pBa9KGIQSDPMmrP+uOrZ9j9HOwvmVWGe+LmZ5Bov0jMnQd6/jVReg==} engines: {node: '>=16.11.0'} dependencies: - '@discordjs/collection': 1.5.3 - '@discordjs/util': 1.0.1 + '@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.50 + discord-api-types: 0.37.61 magic-bytes.js: 1.5.0 tslib: 2.6.2 - undici: 5.22.1 + undici: 5.27.2 dev: false - /@discordjs/util@1.0.1: - resolution: {integrity: sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==} + /@discordjs/util@1.0.2: + resolution: {integrity: sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==} engines: {node: '>=16.11.0'} dev: false - /@discordjs/ws@1.0.1: - resolution: {integrity: sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==} + /@discordjs/ws@1.0.2: + resolution: {integrity: sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==} engines: {node: '>=16.11.0'} dependencies: - '@discordjs/collection': 1.5.3 - '@discordjs/rest': 2.0.1 - '@discordjs/util': 1.0.1 + '@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.50 + discord-api-types: 0.37.61 tslib: 2.6.2 ws: 8.14.2 transitivePeerDependencies: @@ -714,6 +719,11 @@ packages: resolution: {integrity: sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@fastify/busboy@2.1.0: + resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} + engines: {node: '>=14'} + dev: false + /@humanwhocodes/config-array@0.11.13: resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} @@ -1803,13 +1813,6 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true - /busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} - dependencies: - streamsearch: 1.1.0 - dev: false - /cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} @@ -2072,27 +2075,27 @@ packages: path-type: 4.0.0 dev: true - /discord-api-types@0.37.50: - resolution: {integrity: sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==} + /discord-api-types@0.37.61: + resolution: {integrity: sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==} dev: false - /discord.js@14.13.0: - resolution: {integrity: sha512-Kufdvg7fpyTEwANGy9x7i4od4yu5c6gVddGi5CKm4Y5a6sF0VBODObI3o0Bh7TGCj0LfNT8Qp8z04wnLFzgnbA==} + /discord.js@14.14.1: + resolution: {integrity: sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==} engines: {node: '>=16.11.0'} dependencies: - '@discordjs/builders': 1.6.5 + '@discordjs/builders': 1.7.0 '@discordjs/collection': 1.5.3 - '@discordjs/formatters': 0.3.2 - '@discordjs/rest': 2.0.1 - '@discordjs/util': 1.0.1 - '@discordjs/ws': 1.0.1 + '@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.50 + discord-api-types: 0.37.61 fast-deep-equal: 3.1.3 lodash.snakecase: 4.1.1 tslib: 2.6.2 - undici: 5.22.1 + undici: 5.27.2 ws: 8.14.2 transitivePeerDependencies: - bufferutil @@ -2572,7 +2575,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.1.1 + flat-cache: 3.2.0 /file-type@17.1.6: resolution: {integrity: sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==} @@ -2626,9 +2629,9 @@ packages: semver-regex: 4.0.5 dev: true - /flat-cache@3.1.1: - resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} - engines: {node: '>=12.0.0'} + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} dependencies: flatted: 3.2.9 keyv: 4.5.4 @@ -4261,11 +4264,6 @@ packages: escape-string-regexp: 2.0.0 dev: true - /streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} - dev: false - /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -4542,11 +4540,11 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /undici@5.22.1: - resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} + /undici@5.27.2: + resolution: {integrity: sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==} engines: {node: '>=14.0'} dependencies: - busboy: 1.6.0 + '@fastify/busboy': 2.1.0 dev: false /update-browserslist-db@1.0.13(browserslist@4.22.1):