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
When I start the bot and use after it the command with autocomplete it shows me Unknown Interaction error and somehow after 3 mins this message disappears and after like 10 mins again the same problem
Logs:
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/root/tangolima/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/root/tangolima/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/root/tangolima/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async AutocompleteInteraction.respond (/root/tangolima/node_modules/discord.js/src/structures/AutocompleteInteraction.js:86:5)
at async module.exports (/root/tangolima/events/guild/interactionCreate.js:104:22) {
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/1233883928402722876/aW50ZXJhY3Rpb246MTIzMzg4MzkyODQwMjcyMjg3NjpkcXdQc01RUlJJRnF0R3FEV2xJcVNuVHJlM3ltYTBlM2d4OWk2TmlmZ29BdHkxTnhKY3RqRVRHNzVNMjJ6UHJtNmowcDJSYmU2R0JocExsMXpQeXc1R0tQUFZBVmhIbkNwMmkxdlhzSmNnT0t2N0VGTlhkQ2doemlxdVY5ZVBGSg/callback'
}
Code sample
constsearchKey=url||Random;try{constcachedResults=awaitredisClient.get(`search_results:${searchKey}`);if(cachedResults){constsearchResults=JSON.parse(cachedResults);constchoice=searchResults.map(track=>{lettruncatedName=track.name;if(track.artists.length>0){constartists=track.artists.join(' • ');constmaxLength=100-artists.length-3;// Subtracting length of artists' names and separatortruncatedName=truncatedName.length>maxLength ? `${truncatedName.slice(0,maxLength-3)}...` : truncatedName;}return{name: `${truncatedName}${track.artists.length>0 ? '• '+track.artists.join(' • ') : ''}`,value: track.external_urls&&track.external_urls.spotify ? track.external_urls.spotify : null};});///////////THE PROBLEM IS HERE return await interaction.respond(choice.filter(choice => choice.value !== null)).catch(console.error);}else{constsearchResults=awaitclient.spotifyApi.searchTracks(searchKey,{limit: 6});awaitredisClient.set(`search_results:${searchKey}`,JSON.stringify(searchResults.body.tracks.items.map(track=>({name: track.name,artists: track.artists.map(artist=>artist.name),external_urls: track.external_urls}))));letchoice=[];if(searchResults.body.tracks.items.length===0){choice.push({name: "No results found.",value: null});}else{searchResults.body.tracks.items.forEach(track=>{choice.push({name: `${track.name} • ${track.artists.map(artist=>artist.name).join(' • ')}`,value: track.external_urls.spotify});});}returnawaitinteraction.respond(choice).catch(()=>{});}}catch(error){console.error(error);}
Versions
discord.js 14.15.0
Node.js 21.7.1
Ubuntu 20.04.6 LTS
Issue priority
High (immediate attention needed)
Which partials do you have configured?
User
Which gateway intents are you subscribing to?
Guilds, GuildVoiceStates, GuildMessages
I have tested this issue on a development release
discord.js@14.15.0-dev.1713658222-4ad285804
The text was updated successfully, but these errors were encountered:
Which package is this bug report for?
discord.js
Issue description
When I start the bot and use after it the command with autocomplete it shows me Unknown Interaction error and somehow after 3 mins this message disappears and after like 10 mins again the same problem
Logs:
Code sample
Versions
Issue priority
High (immediate attention needed)
Which partials do you have configured?
User
Which gateway intents are you subscribing to?
Guilds, GuildVoiceStates, GuildMessages
I have tested this issue on a development release
discord.js@14.15.0-dev.1713658222-4ad285804
The text was updated successfully, but these errors were encountered: