diff --git a/src/events/interactions/interactionCreate.ts b/src/events/interactions/interactionCreate.ts index 41c9fe9..b2c0878 100644 --- a/src/events/interactions/interactionCreate.ts +++ b/src/events/interactions/interactionCreate.ts @@ -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: diff --git a/src/modules/client.ts b/src/modules/client.ts index 34ec00c..769687f 100644 --- a/src/modules/client.ts +++ b/src/modules/client.ts @@ -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); } >; };