Improve additional command outputs containing codeblocks.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3b34e72456
commit
2f84bc895d
9 changed files with 40 additions and 128 deletions
|
@ -103,9 +103,7 @@ async fn process_admin_message(msg: String) -> RoomMessageEventContent {
|
|||
Ok(reply_message) => reply_message,
|
||||
Err(error) => {
|
||||
let markdown_message = format!("Encountered an error while handling the command:\n```\n{error}\n```",);
|
||||
let html_message = format!("Encountered an error while handling the command:\n<pre>\n{error}\n</pre>",);
|
||||
|
||||
RoomMessageEventContent::text_html(markdown_message, html_message)
|
||||
RoomMessageEventContent::notice_markdown(markdown_message)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue