What is the best way to recover my buttons components?

Example: If my bot restarts, all buttons components will stop working, because i will lose all my collectors. I thought about saving all the buttons components in a database and when i start the bot, create a collector for all buttons saved in database. Is it a stupid idea or is there a better way? hahah
5 Replies
d.js toolkit
d.js toolkit5mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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
treble/luna
treble/luna5mo ago
just use the interactionCreate event
orion
orionOP5mo ago
And get the button id?
treble/luna
treble/luna5mo ago
you can get the customid yes
orion
orionOP5mo ago
i'll do it thanks for the help :a_maeHeart:
Want results from more Discord servers?
Add your server