Closed kevinlul closed 2 years ago
Update to discord.js 13.3.1.
I understand the merits of updating to the latest version, but can you confirm these are known crashes that were fixed or is it just a matter of best practice?
The stack trace your error comes from is relevant to these lines of code at a point in time:
So in line 13 there, you can see we assume there is a channel with messages always. However, as of 13.3.1:
Line 13 checks if a channel is actually text-based. If it is not, we safely return out before trying to access the cache. Ergo, yes this will fix your issue. This fix is present from 13.3.1 onwards.
Also see #7130.
Thanks, we'll upgrade then.
Issue description
On December 20, we encountered two cryptic crashes that we have never seen before from Discord.js internals. They occurred within a minute of each other and we've never seen this before with our use of Discord.js this past year. Timestamps are in UTC.
Dec 20 18:01:38
Dec 20 18:02:30
I'm not sure how to reproduce this. It hasn't recurred again, which is good, but it is still not good for regular bot operation to experience an arbitrary crash. Might the official rollout of Guild Member Timeouts have caused something weird?
Code sample
No response
discord.js version
13.1.0
Node.js version
v16.13.1, TypeScript 4.4.3
Operating system
Docker version 20.10.2, build 2291f61 (base image node:16), host Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-161-generic x86_64)
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
CHANNEL
Which gateway intents are you subscribing to?
GUILDS, GUILD_MESSAGES, DIRECT_MESSAGES
I have tested this issue on a development release
No response