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()) } ); } };