𝗦𝗮𝘁𝗮𝗻
DIdiscord.js - Imagine ❄
•Created by 𝗦𝗮𝘁𝗮𝗻 on 12/17/2024 in #djs-questions
Question on message component collector
18 replies
DIdiscord.js - Imagine ❄
•Created by 𝗦𝗮𝘁𝗮𝗻 on 12/10/2024 in #djs-questions
Need help with pagination
hello
can someone please help me with this issue i'm facing with pagination buttons
player.js command file code: https://pastebin.com/AARaEK7v
pagination.js code: https://pastebin.com/Rv0ctPTV
when i'm using await i.deferUpdate(); the buttons don't work and i get below error in logs:
DiscordAPIError[10062]: Unknown interaction
at handleErrors (D:\git\rtd-bot\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (D:\git\rtd-bot\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:826:23)
at async _REST.request (D:\git\rtd-bot\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:1266:22)
at async ButtonInteraction.deferUpdate (D:\git\rtd-bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:200:5)
at async InteractionCollector.<anonymous> (D:\git\rtd-bot\src\events\playerPagination.js:49:13) {
requestBody: { files: undefined, json: { type: 6 } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1316040646011654216/aW50ZXJhY3Rpb246MTMxNjA0MDY0NjAxMTY1NDIxNjpUSUFnUDg5alEyZzhIQjBWRlVQdVlicDhjZlFiMVpPbWk1d3JQRDhKV0cxTmlIcTVLaFl1cnhIRWJGNXQ2RlhiOHdNWFdQUDRtMGtzbHJaQXBxWDZlSGJIU2tXWDZaS1Q1eG5YdzZqSmt5ZjhxSU04MHhLS043UUtUZlZzbzlXag/callback'
}
when i remove it, the buttons work, i don't get any exception in logs, but i get an ephemeral saying there was an error as seen in the image attached
tried it with external pagination modules like @devraelfreeze/discordjs-pagination
and pagination-djs as well, same thing is happening12 replies