aboutsummaryrefslogtreecommitdiff
path: root/src/ext/framework/create_command.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-04-15 22:37:49 -0700
committerZeyla Hellyer <[email protected]>2017-04-19 14:53:32 -0700
commite1079e9a03473f9ec67414628d5b84e7ea1b5b38 (patch)
treec872eced06b3a1dfce04e876f1d7c381ee926f29 /src/ext/framework/create_command.rs
parentAdd a test suite for event deserialization (diff)
downloadserenity-e1079e9a03473f9ec67414628d5b84e7ea1b5b38.tar.xz
serenity-e1079e9a03473f9ec67414628d5b84e7ea1b5b38.zip
Check for embed lengths on message sends
Due to the maximum length of the textual content of an embed being 4000, this should be checked prior to message sending. Embeds have a fairly new limit of only being 4000 character long, at maximum. The length of these fields - where present - should be summed, so that bad requests are not made with embeds that are too large in text. The fields that count as "textual" includes: - author name - description - `name` and `value` of each field - footer text - title If this exceeds the limit - currently at 4000 unicode codepoints - then a `ClientError::EmbedTooLarge` will be returned, including the number of codepoints overflowing.
Diffstat (limited to 'src/ext/framework/create_command.rs')
0 files changed, 0 insertions, 0 deletions