How do I listen for reactions on all messages in a channel?
doing discord bot dev after a long time. i wanted to listen for message reactions on every message in a channel and run a db query in the
run
function. but for some reason i can't even get a simple log to work rn. what am i doing wrong here?
Solution:Jump to solution
Do you have the GuildMessageReactions Intent enabled?
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message....
8 Replies
Solution
Do you have the GuildMessageReactions Intent enabled?
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message.
i think i do have it enabled
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message.what does this mean exactly?
cached messages are messages that has been sent after the bot is online, so once you restart the bot the previous messages are no longer cached
ah interesting
for this bot i def have to keep checking the reactions for old messages as well
is there a way to do that if the bot went offline for some time?
have a look at partials then
do you have a link to some kind of documentation or example?
oh wait is it just an intent
discordjs guide has an example
ah got it
thanks so much!