Discord.js: messageUpdate event does not fire on version 12.4.0

Created on 24 Oct 2020  Â·  3Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
The messageUpdate event does not fire at all on the current available version (12.4.0), not even when using partials in my testing, the only time I could get it to fire was using the raw MESSAGE_UPDATE event. After all my testing I realised there was a version update and switched back to v12.3.1 which worked as expected.

Include a reproducible code sample here, if possible:

client.on('messageUpdate', (oldMessage, newMessage) => {
  console.log('test') // Check to see if it will fire at all
})

Further details:

  • discord.js version: 12.4.0
  • Node.js version: 12.19.0
  • Operating system: Linux Mint 20 Cinnamon
  • Priority this issue should have – please be realistic and elaborate if possible: Medium/High, if this is a reproducible bug for others it could be a major issue for all bots that require it

Relevant client options:

  • partials: MESSAGE (Tested with and without)
  • gateway intents: none
  • other: none
  • [x] I have also tested the issue on latest master, commit hash: 250c3ae3c1f025c092383e4661bbb386e89a3c23
invalid bug

Most helpful comment

@PoroUsedSnax It looks like you're using Klasa framework, from what we can tell from your GitHub profile. Just now we were also facing this issue with https://github.com/skyra-project/skyra and it turns out the problem was in the Klasa framework code (which, btw, is quite fragile). We have found the fix to be in KlasaMessage, you can see it here: https://github.com/skyra-project/klasa/commit/1e3e92b77fb844071a31d034e8c364975928da53.

Note: The Klasa framework has been deprecated and is not recommended to continue using in the future

All 3 comments

I can not reproduce this behavior on 12.4.0 (node 14.9.0, not that i can see that mattering much)

| | message partials | no message partials
|---|---|---|
| cached message | yes | yes
| uncached message | yes | no

Which is entirely expected

@PoroUsedSnax It looks like you're using Klasa framework, from what we can tell from your GitHub profile. Just now we were also facing this issue with https://github.com/skyra-project/skyra and it turns out the problem was in the Klasa framework code (which, btw, is quite fragile). We have found the fix to be in KlasaMessage, you can see it here: https://github.com/skyra-project/klasa/commit/1e3e92b77fb844071a31d034e8c364975928da53.

Note: The Klasa framework has been deprecated and is not recommended to continue using in the future

Yes, I should have potentially specified at the time that I had been using the framework, I thought at the time making use of client.on() may bypass things and that's what gave me the idea there was a bug, it didn't help that I was frustrated after debugging for a few hours to see if anything could work and I should have considered more.

I am aware Klasa is deprecated but unfortunately I'm too invested in it with multiple bots and other things personally to have the time and ability to make a switch so I attempt to keep it maintained myself to a degree.

Regardless, I will close this as a mistake on my part.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Brawaru picture Brawaru  Â·  3Comments

Blumlaut picture Blumlaut  Â·  3Comments

Acaretia picture Acaretia  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

shukriadams picture shukriadams  Â·  3Comments