diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/model/channel/message.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs index 11855b8..5dc59a1 100644 --- a/src/model/channel/message.rs +++ b/src/model/channel/message.rs @@ -488,10 +488,10 @@ impl Message { total += title.len(); } - if total > constants::EMBED_MAX_LENGTH as usize { + if total <= constants::EMBED_MAX_LENGTH as usize { Ok(()) } else { - let overflow = constants::EMBED_MAX_LENGTH as u64 - total as u64; + let overflow = total as u64 - constants::EMBED_MAX_LENGTH as u64; Err(Error::Client(ClientError::EmbedTooLarge(overflow))) } |