hotfix: format lock command additional comments, fixed format of discord embed
This commit is contained in:
parent
6d6c2b2952
commit
29a540842f
2 changed files with 8 additions and 7 deletions
|
|
@ -170,9 +170,9 @@ pub async fn preview(
|
||||||
let faq = faqs.first().expect("FAQ not found");
|
let faq = faqs.first().expect("FAQ not found");
|
||||||
|
|
||||||
let embed = CreateEmbed::new().title(&faq.title).description(format!(
|
let embed = CreateEmbed::new().title(&faq.title).description(format!(
|
||||||
"```
|
"```\n\
|
||||||
{}
|
{}\n\
|
||||||
```",
|
```",
|
||||||
&faq.description
|
&faq.description
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,10 @@ pub async fn vibecoded(
|
||||||
format_embed_description(&lock_message.description).expect("Format error");
|
format_embed_description(&lock_message.description).expect("Format error");
|
||||||
if !comment_option.is_none() {
|
if !comment_option.is_none() {
|
||||||
let comment = comment_option.expect("Comment error");
|
let comment = comment_option.expect("Comment error");
|
||||||
|
let formatted_comment = format_embed_description(comment).expect("Format comment error");
|
||||||
let new_description = format!(
|
let new_description = format!(
|
||||||
"{}\n\n**Additional Comment(s)**\n{}",
|
"{}\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");
|
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()
|
let embed = CreateEmbed::new()
|
||||||
.title(&lock_message.title)
|
.title(&lock_message.title)
|
||||||
.description(format!(
|
.description(format!(
|
||||||
"```
|
"```\n\
|
||||||
{}
|
{}\n\
|
||||||
```",
|
```",
|
||||||
&lock_message.description
|
&lock_message.description
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue