Skip to content

oldMessage in messageUpdate event always being a partial message #3248

Description

@Jyguy

Please describe the problem you are having in as much detail as possible:
The oldMessage object in Client#messageUpdate is always a partial message (.author null, .content undefined, etc.) when partials for MESSAGE is enabled, cached or not.

Running the code below results in these logs:
oldMessage before fetch: https://pastebin.com/dh33sMDL
oldMessage after fetch: https://pastebin.com/JPRQzLkG

Include a reproducible code sample here, if possible:

const Discord = require('discord.js');
const client = new Discord.Client({
  partials: ['MESSAGE']
});

client.on('ready', () => console.log('Ready'));

client.on('messageUpdate', async (oldMessage, newMessage) => {
  console.log(oldMessage);
  await oldMessage.fetch();
  console.log(oldMessage);
});

client.login('token');

Further details:

  • discord.js version: master

  • Node.js version: v11.14.0

  • Operating system: Manjaro v18.0.4

  • Priority this issue should have – please be realistic and elaborate if possible: Medium

  • I have also tested the issue on latest master, commit hash: 8b83e2f

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions