From 29a540842fd473199856bd22a23db145408bd475 Mon Sep 17 00:00:00 2001 From: liyunze <50455574+liyunze-coding@users.noreply.github.com> Date: Fri, 25 Sep 2026 15:38:45 +0800 Subject: [PATCH] hotfix: format lock command additional comments, fixed format of discord embed --- src/commands/faq.rs | 6 +++--- src/commands/lock.rs | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/commands/faq.rs b/src/commands/faq.rs index ef6afc4..98eecef 100644 --- a/src/commands/faq.rs +++ b/src/commands/faq.rs @@ -170,9 +170,9 @@ pub async fn preview( let faq = faqs.first().expect("FAQ not found"); let embed = CreateEmbed::new().title(&faq.title).description(format!( - "``` -{} - ```", + "```\n\ + {}\n\ + ```", &faq.description )); diff --git a/src/commands/lock.rs b/src/commands/lock.rs index d4cede1..dd4e629 100644 --- a/src/commands/lock.rs +++ b/src/commands/lock.rs @@ -88,9 +88,10 @@ pub async fn vibecoded( format_embed_description(&lock_message.description).expect("Format error"); if !comment_option.is_none() { let comment = comment_option.expect("Comment error"); + let formatted_comment = format_embed_description(comment).expect("Format comment error"); let new_description = format!( "{}\n\n**Additional Comment(s)**\n{}", - &lock_message.description, comment + &lock_message.description, formatted_comment ); embed_description = format_embed_description(new_description).expect("Format error"); } @@ -192,9 +193,9 @@ pub async fn preview(ctx: Context<'_>) -> Result<(), Error> { let embed = CreateEmbed::new() .title(&lock_message.title) .description(format!( - "``` -{} - ```", + "```\n\ + {}\n\ + ```", &lock_message.description ));