Discord.js: DM channels only cache 1 message

Created on 4 Jun 2019  Â·  2Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
In a DM channel, there is only 1 message cached at any point in time.
This seems to be only occuring on master branch.

Include a reproducible code sample here, if possible:
Repeatedly evaluating this in a DM channel when there are messages being sent in it always return 1:

dmChannel.messages.size;

Further details:

  • discord.js version: v12.0.0-dev (master branch)
  • Node.js version: v12.3.1
  • Operating system: Linux Mint 19.1 Tessa, xfce4
  • Priority this issue should have – please be realistic and elaborate if possible:
  • [x] I have also tested the issue on latest master, commit hash: 405bdb5b558eff478d0bde739cee1ee8e40c330b
caching bug

All 2 comments

AFAIK DM channels only exist in Client#channels when the bot itself creates the dm. so is this really a bug?
Considering you only get sent the channel_id and not the channel object.

Just reproduced this myself trying to provide support for someone who was creating ReactionCollectors on multiple messages in a DMChannel - not possible since only the latest message was cached.

Confirmed with eval message.channel.messages.size always being 1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Brawaru picture Brawaru  Â·  3Comments

Alipoodle picture Alipoodle  Â·  3Comments

Acaretia picture Acaretia  Â·  3Comments

LLamaFTL picture LLamaFTL  Â·  3Comments

BrandonCookeDev picture BrandonCookeDev  Â·  3Comments