add type
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2023-03-11 11:23:18 +01:00
parent ba4a286c80
commit 6ad8fd1039
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 7 additions and 1 deletions

View file

@ -35,7 +35,11 @@ export default (interaction: Interaction, client: Client) => {
return console.error(loc.get("e_interacreate_no_command"));
}
return command.autocomplete(interaction);
if (command.autocomplete) {
return command.autocomplete(interaction);
}
return;
}
default:

View file

@ -79,6 +79,8 @@ declare module "discord.js" {
data: SlashCommandBuilder;
/** How the command interact */
interaction: (interaction: CommandInteraction, client: Client) => unknown;
/** Autocomplete logic */
autocomplete: undefined | ((interaction: AutocompleteInteraction) => unknown);
}
>;
};