Discord.js: messageReactionAdd event not triggering if message has been sent before bot start

Created on 10 Aug 2018  Â·  2Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:

I am not sure whether this is by design, but the messageReactionAdd event only fires on messages which have been sent after the bot has started. So, if I add a reaction to an older message, the even won't get triggered.

See here: https://github.com/discordjs/discord.js/issues/1279#issuecomment-351171836

Include a reproducible code sample here, if possible:

"use strict";

let Discord = require("discord.js");
const client = new Discord.Client();

client.on("messageReactionAdd", (messageReaction, user) => {
    console.log(messageReaction);
});

client.login("foo");

Further details:

  • discord.js version: v11.3.2
  • node.js version: v8.11.3
  • Operating system: Ubuntu 16.04
  • Priority this issue should have – please be realistic and elaborate if possible:
    Not quite sure. This isn't a major bug I guess.

  • [ ] I found this issue while running code on a __user account__

  • [ ] I have also tested the issue on latest master, commit hash:
invalid

Most helpful comment

This is by design. See here for how to get around it:
https://discordjs.guide/#/popular-topics/reactions?id=listening-for-reactions-on-old-messages

All 2 comments

This is by design. See here for how to get around it:
https://discordjs.guide/#/popular-topics/reactions?id=listening-for-reactions-on-old-messages

Alright, thank you very much! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Blumlaut picture Blumlaut  Â·  3Comments

tiritto picture tiritto  Â·  3Comments

smchase picture smchase  Â·  3Comments

PassTheMayo picture PassTheMayo  Â·  3Comments

xCuzImPro picture xCuzImPro  Â·  3Comments