This commit is contained in:
Dragon Fire
2024-04-07 20:17:17 -04:00
parent 76fd56b03a
commit ab61794d7c
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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 {
+3 -3
View File
@@ -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()) }
);
}
};