Recurring "Cannot send an empty message" error
Hello, I'm intermittently getting hit with 50006 "Cannot send an empty message" errors in a production environment using discord.js. I can't seem to find any pattern aside from the fact that it occurs when sending attachments, specifically text files I've created server-side. Simply running a command multiple times will sometimes succeed and sometimes fail. Any ideas as to why this could be happening?!
70 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Hello
Here is the full error:
The code is a bit complex and spans multiple files/functions, but in the end the important part is:
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
Hello
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
I'm.here to help
The issue occurs without embeds as well (even if that parameter isn't provided)
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
??
Agreed! and this only started happening suddenly without any noticeable cause
The production environment also has the same dependency and node versions
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
Dependencies:
Node:
v22.4.1
Bun: 1.1.20
(not actually sure if that is the same in production now that I think about it)
I've also tested without bufferutil and utf-8-validate, though the issue persistedUnknown User•2mo ago
Message Not Public
Sign In & Join Server To View
I'm here to helpppppp