Add embed character count to message builder and embeds.
Created by: loukylor
Summary
Adds a check so that the 6000 character limit on embeds is easier to track.
Details
Right now, there's no easy way to check if you've exceeded the 6000 character limit on message embeds. This should hopefully fix that issue.
Changes proposed
- Adds a
CharCount
property toDiscordEmbed
,DiscordEmbedField
,DiscordEmbedFooter
,DiscordEmbedAuthor
,DiscordEmbedBuilder
,EmbedAuthor
, andEmbedFooter
. - It also adds an
EmbedsCharCount
property toDiscordMessageBuilder
. - A check to make sure the count does not exceed 6000 is in place for
DiscordEmbedBuilder
's andDiscordMessageBuilder
's property. If the number is exceeded, anArgumentException
will throw. - The properties only reflect the characters that Discord counts.