Functional join command server side
This commit is contained in:
@@ -7,12 +7,10 @@ export async function execute(nodeIo, interaction) {
|
||||
console.log("Interaction created for command: ", command);
|
||||
|
||||
// Execute autocomplete if the user is checking autocomplete
|
||||
/*
|
||||
if (interaction.isAutocomplete()) {
|
||||
console.log("Running autocomplete for command: ", command.data.name);
|
||||
return await command.autocomplete(interaction);
|
||||
}
|
||||
*/
|
||||
|
||||
// Check if the interaction is a command
|
||||
if (!interaction.isChatInputCommand()) return;
|
||||
@@ -24,5 +22,11 @@ export async function execute(nodeIo, interaction) {
|
||||
|
||||
console.log(`${interaction.member.user} is running '${interaction.commandName}'`);
|
||||
|
||||
// Defer the initial reply if the command has the parameter set
|
||||
if (command.deferInitialReply) {
|
||||
await interaction.deferReply();
|
||||
}
|
||||
|
||||
// Execute the command
|
||||
command.execute(nodeIo, interaction);
|
||||
}
|
||||
Reference in New Issue
Block a user