From ab61794d7c96948dcc62787723efa5242e0fc6d4 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Apr 2024 20:17:17 -0400 Subject: [PATCH] Fix --- framework/Client.js | 2 +- framework/slash/SlashRegistry.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/Client.js b/framework/Client.js index 4b5697e7..1c9302fc 100644 --- a/framework/Client.js +++ b/framework/Client.js @@ -155,7 +155,7 @@ module.exports = class CommandClient extends Client { async onInteractionCreate(interaction) { if (!interaction.isChatInputCommand()) return; - const command = this.slashRegistry.commands.get(interaction.commandName); + const { command } = this.slashRegistry.commands.get(interaction.commandName); if (!command) return; try { diff --git a/framework/slash/SlashRegistry.js b/framework/slash/SlashRegistry.js index f355c1c0..8a1fa956 100644 --- a/framework/slash/SlashRegistry.js +++ b/framework/slash/SlashRegistry.js @@ -31,15 +31,15 @@ module.exports = class SlashRegistry { uploadTestCommands() { return this.client.rest.put( - Routes.applicationGuildCommands(this.client.id, TEST_GUILD_ID), + Routes.applicationGuildCommands(this.client.user.id, TEST_GUILD_ID), { body: this.commands.map(cmd => cmd.data.toJSON()) } ); } uploadGlobalCommands() { return this.client.rest.put( - Routes.applicationCommands(this.client.id), - { body: commands } + Routes.applicationCommands(this.client.user.id), + { body: this.commands.map(cmd => cmd.data.toJSON()) } ); } };