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
d.js toolkit
d.js toolkit2y ago
• 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.
OIRNOIR
OIRNOIROP2y ago
Apparently the way to calculate if an embed may be sent by itself or not is JSON.stringify(embed.toJSON()).length > 6000
d.js docs
d.js docs2y ago
property Embed#length The accumulated length for the embed title, description, fields, footer text, and author name.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server