diff --git a/package.json b/package.json index c66397c..26175c5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "license": "MIT", "packageManager": "pnpm@10.17.1", "dependencies": { - "@discordjs/core": "^2.2.2", "discord.js": "^14.22.1", "web-features": "^3.3.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1d5162..7d2a9fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: dependencies: - '@discordjs/core': - specifier: ^2.2.2 - version: 2.2.2 discord.js: specifier: ^14.22.1 version: 14.22.1 @@ -38,7 +35,7 @@ importers: version: 4.20.6 typescript: specifier: ^5.9.2 - version: 5.9.2 + version: 5.9.3 packages: @@ -107,10 +104,6 @@ packages: resolution: {integrity: sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==} engines: {node: '>=18'} - '@discordjs/core@2.2.2': - resolution: {integrity: sha512-J2YBG9AclyALcamdEyT+so6bhW+Ys6TslXIaNLw0lN0lkGKUaaqXwUccQBnzZmJt1s4k29dXrdY0pqSnVsl7JA==} - engines: {node: '>=20'} - '@discordjs/formatters@0.6.1': resolution: {integrity: sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==} engines: {node: '>=16.11.0'} @@ -127,10 +120,6 @@ packages: resolution: {integrity: sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw==} engines: {node: '>=16.11.0'} - '@discordjs/ws@2.0.3': - resolution: {integrity: sha512-c/Yd0eK2kFAvGn5/xECdUziSXLQh7tFO7kw2nfsj46B6txhPpJweR8yYjtYQ+kbUsaFcoQOrZ69wYqfetdqSHw==} - engines: {node: '>=20'} - '@esbuild/aix-ppc64@0.25.10': resolution: {integrity: sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==} engines: {node: '>=18'} @@ -1024,18 +1013,6 @@ snapshots: '@discordjs/collection@2.1.1': {} - '@discordjs/core@2.2.2': - dependencies: - '@discordjs/rest': 2.6.0 - '@discordjs/util': 1.1.1 - '@discordjs/ws': 2.0.3 - '@sapphire/snowflake': 3.5.5 - '@vladfrangu/async_event_emitter': 2.4.7 - discord-api-types: 0.38.28 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@discordjs/formatters@0.6.1': dependencies: discord-api-types: 0.38.28 @@ -1069,21 +1046,6 @@ snapshots: - bufferutil - utf-8-validate - '@discordjs/ws@2.0.3': - dependencies: - '@discordjs/collection': 2.1.1 - '@discordjs/rest': 2.6.0 - '@discordjs/util': 1.1.1 - '@sapphire/async-queue': 1.5.5 - '@types/ws': 8.18.1 - '@vladfrangu/async_event_emitter': 2.4.7 - discord-api-types: 0.38.28 - tslib: 2.8.1 - ws: 8.18.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@esbuild/aix-ppc64@0.25.10': optional: true diff --git a/src/util/deploy.ts b/src/util/deploy.ts index 9a089a3..6216dbe 100644 --- a/src/util/deploy.ts +++ b/src/util/deploy.ts @@ -1,5 +1,4 @@ -import { API } from '@discordjs/core/http-only'; -import { REST, type RESTPutAPIApplicationCommandsResult } from 'discord.js'; +import { REST, type RESTPutAPIApplicationCommandsResult, Routes } from 'discord.js'; import { commands } from '../commands/index.js'; import { config } from '../env.js'; @@ -7,12 +6,13 @@ export async function deployCommands(): Promise command.data); const rest = new REST({ version: '10' }).setToken(config.discord.token); - const api = new API(rest); - const result = await api.applicationCommands.bulkOverwriteGlobalCommands( - config.discord.clientId, - commandData - ); + const result = (await rest.put( + Routes.applicationGuildCommands(config.discord.clientId, config.serverId), + { + body: commandData, + } + )) as RESTPutAPIApplicationCommandsResult; console.log(`Successfully registered ${result.length} commands.`); return result;