Is there a way to calculate the total character count of all fields of a message before it is sent
I want to be able to calculate the character count of a message (Most helpful if it was caluculatable for individual embeds) so I don't get apierrors
4 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Apparently the way to calculate if an embed may be sent by itself or not is JSON.stringify(embed.toJSON()).length > 6000
Embed#length
The accumulated length for the embed title, description, fields, footer text, and author name.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View