You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue where options do not work as they should in thread channels. The bot cannot use options the first time or during the initial period when opening thread channels, even though it has all necessary permissions and has been tagged. I have to repeatedly tag the bot or reopen options to get the bot working correctly without the 'Unknown interaction' error. Once the bot can select options, it does not encounter errors for that session. I think it's a bug because it used to work fine before without any problems.
Logs:
Error in autocomplete: DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:730:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:835:23)
at async _REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1278:22)
at async AutocompleteInteraction.respond (/home/container/node_modules/discord.js/src/structures/AutocompleteInteraction.js:86:5)
at async Object.autocomplete (/home/container/commands/party.js:44:7)
at async Client.<anonymous> (/home/container/index.js:98:17) {
requestBody: { files: undefined, json: { type: 8, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1250121020724088872/aW50ZXJhY3Rpb246MTI1MDEyMTAyMDcyNDA4ODg3Mjp3aUJMYTd2VVNzTVE4eFdOVjhUeWhmNkNJNUh4S0lTWlVKR0s1Mmc2OHdxVWtCam5PdTZQYU0yZXNJTTVFUjd5TTV4OGV3ZDJpSFl2cUZyYVpReGpDTXVyYkxmY1gyZXF0bm1ZcXUwM09INjlHYXplV2Q4Zk16UEhDMVViYmxBcQ/callback'
}
Code sample
constcommand=newSlashCommandBuilder().setName("party").setDescription("Input party-event to google sheet");command.addAttachmentOption((option)=>option.setName("image").setDescription("Image File").setRequired(true));command.addStringOption((option)=>option.setName("1").setDescription(Description).setRequired(true).setAutocomplete(true));for(leti=2;i<=Party;i++){command.addStringOption((option)=>option.setName(i.toString()).setDescription(Description).setRequired(false).setAutocomplete(true));}module.exports={data: command,asyncautocomplete(interaction){try{constcacheData=mapData.get('Checkname')||[];constchoices=cacheData.flat();constfocusedValue=interaction.options.getFocused();constfiltered=choices.filter((choice)=>choice.normalize().toLowerCase().includes(focusedValue.normalize().toLowerCase()));constoptions=filtered.slice(0,25).map(option=>({name: option,value: option}));awaitinteraction.respond(options);}catch(error){console.error('Error in autocomplete:',error);awaitinteraction.respond([]);}},};
You appear to be describing behaviour on Discord. discord.js does not influence how the Discord client works. You should report this issue to Discord. I also would not be surprised if your response is taking more than 3 seconds—the flattening and normalisations give it away.
Which package is this bug report for?
discord.js
Issue description
I encountered an issue where options do not work as they should in thread channels. The bot cannot use options the first time or during the initial period when opening thread channels, even though it has all necessary permissions and has been tagged. I have to repeatedly tag the bot or reopen options to get the bot working correctly without the 'Unknown interaction' error. Once the bot can select options, it does not encounter errors for that session. I think it's a bug because it used to work fine before without any problems.
Logs:
Code sample
Versions
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
User, Channel, GuildMember, Message, Reaction, GuildScheduledEvent, ThreadMember
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildEmojisAndStickers, GuildMessages, GuildMessageReactions, DirectMessages, MessageContent
I have tested this issue on a development release
c5d40d3
The text was updated successfully, but these errors were encountered: