#InteractionCreate for autocomplete won't fire on some commands

17 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?

stable geodeBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
ivory prairie
paper shale
#

same here

ivory prairie
# paper shale same here

oh phew, I thought I was insane and spent hours trying to look into it, thinking it was an error on my part

#

wonder if it could be a discord API thing

paper shale
#

yeah thats what im thinking

#

just really weird that i touched Nothing and it just started randomly happening LOL

ivory prairie
#

dang

#

I was refactoring my code which is a terrible coincidence because it made me think I broke it

#

oh well

paper shale
#

To see if that's the issue try to reproduce the bug on your web browser, then look at the network tab for an error like this:

ivory prairie
#

ty for letting me know, hopefully they fix it soon

paper shale
#

np

balmy iron
#

Same here