pandachu
pandachu

Reputation: 17

is there a way to save reaction role data?

I've currently got reaction roles set up in my code and they work, however I have to rerun the command every time I restart the bot, which isn't optimal.

Is it possible at all to cache the data so that there is only one reaction role message and the roles are given out regardless of how many times the bot has rebooted?

Any help with this is greatly appreciated!

Upvotes: 0

Views: 116

Answers (1)

Alekos
Alekos

Reputation: 51

in order to do this you need to have a database setup and store the message's id. Then when your bot starts you can fetch that message inside messageReactionAdd/messageReactionRemove client event(s) and track for reactions on the message id you have previously stored.

Upvotes: 2

Related Questions