mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
@@ -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()) }
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user