#InteractionCreate for autocomplete won't fire on some commands

1 messages · Page 1 of 1 (latest)

ivory prairie

Below is my code. There are no errors at all - on some commands the autocomplete works, on others nothing even prints for Events.InteractionCreate. My options have .setAutocomplete(true).

Here is the map option. The code for it is the exact same for both of my commands:

        .addStringOption((option) =>
            option
                .setName('map')
                .setDescription('Name of the map')
                .setRequired(true)
                .setAutocomplete(true)
        )

Here is the top of the of the InteractionCreate event handler, the rest doesn't matter as it doesn't even reach the console.log statement

    client.on(discord.Events.InteractionCreate, async (interaction) => {
        console.log(`Interaction received for ${interaction.commandName} with type ${interaction.type}`)
        try {
            if (interaction.isAutocomplete()) {
                console.log(`Autocomplete interaction received for ${interaction.commandName}`)

In pic 1 and 2 you can see that it cannot load any options, and in fact nothing even prints. No errors either.
In pic 3 and 4 I used a different command which has the exact same option yet the event fires for it and it works

What could be the issue?