diff options
Diffstat (limited to 'src/commands/discocaml.rs')
-rw-r--r-- | src/commands/discocaml.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands/discocaml.rs b/src/commands/discocaml.rs index 6defac0..e6b1a0b 100644 --- a/src/commands/discocaml.rs +++ b/src/commands/discocaml.rs @@ -182,8 +182,15 @@ async fn respond_with_error<E: std::error::Error, F: Future<Output = Result<(), err: &Error, send: impl FnOnce(CreateInteractionResponse) -> F, ) { + let mut content = format!(":no_entry_sign: {}", err); + if let Some((i, _)) = content.char_indices().nth(1997) { + content.truncate(i); + assert_eq!(content.chars().count(), 1997); + content.push_str("…"); + } + let msg = CreateInteractionResponseMessage::new() - .content(format!(":no_entry_sign: {}", err)) + .content(content) .flags(InteractionResponseFlags::EPHEMERAL); if let Err(err) = send(CreateInteractionResponse::Message(msg)).await { log::error!( |