Edit message on button click DJS14
Hey,
I'm trying to make a slash command on my bot to fetch a list of users in my database.
It'll work that way :
/info pseudo:aznoob
and will print a bunch of information game-related on the user.
I know my query is working, now, my issue is with formatting.
I would like to print each user individually with its own information within an embed, with 2 buttons : "previous" and "next".
A good example of what I'm trying to do is Unbelievaboat with its leaderboard (see picture).
I still question how I should do it though.
I don't want to spam my database with queries, so the way I'm working right now is with a query that'll fetch all occurrence of my research and store it in an array.
The bot will then build each embed within a for loop, and store it in an array.
My code right now :
My main question is : how can I do to edit the message on button click ?
Thanks for your help.
Aznoob.3 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.use collectors