Compare commits
8 commits
hotfix/loc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b848d1335e | |||
| 1c5203f9b5 | |||
|
|
1e78b32dd8 | ||
| b6023adc1e | |||
| 61168a35f9 | |||
|
|
48e84af17b | ||
|
|
d24cc900d0 | ||
|
|
bf4012f1f4 |
2 changed files with 25 additions and 13 deletions
|
|
@ -168,12 +168,19 @@ pub async fn preview(
|
|||
.await?;
|
||||
|
||||
let faq = faqs.first().expect("FAQ not found");
|
||||
let embed_description = format_embed_description(&faq.description).expect("Format error");
|
||||
|
||||
let embed = CreateEmbed::new().title(&faq.title).description(format!(
|
||||
"```\n\
|
||||
{}\n\
|
||||
```",
|
||||
&faq.description
|
||||
let embed = CreateEmbed::new()
|
||||
.title(format!("Title: {}", &faq.title))
|
||||
.description(format!(
|
||||
"\
|
||||
**Raw Text**\n\
|
||||
```\n\
|
||||
{}\
|
||||
```\n\
|
||||
**Preview:**\n\
|
||||
{}",
|
||||
&faq.description, embed_description
|
||||
));
|
||||
|
||||
ctx.send(CreateReply::default().embed(embed)).await?;
|
||||
|
|
|
|||
|
|
@ -88,10 +88,9 @@ 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, formatted_comment
|
||||
&lock_message.description, comment
|
||||
);
|
||||
embed_description = format_embed_description(new_description).expect("Format error");
|
||||
}
|
||||
|
|
@ -189,14 +188,20 @@ pub async fn preview(ctx: Context<'_>) -> Result<(), Error> {
|
|||
.await?;
|
||||
|
||||
let lock_message = lock_messages.first().expect("Lock message not found");
|
||||
let embed_description =
|
||||
format_embed_description(&lock_message.description).expect("Format error");
|
||||
|
||||
let embed = CreateEmbed::new()
|
||||
.title(&lock_message.title)
|
||||
.title(format!("Title: {}", &lock_message.title))
|
||||
.description(format!(
|
||||
"```\n\
|
||||
{}\n\
|
||||
```",
|
||||
&lock_message.description
|
||||
"\
|
||||
**Raw Text**\n\
|
||||
```\n\
|
||||
{}\
|
||||
```\n\
|
||||
**Preview:**\n\
|
||||
{}",
|
||||
&lock_message.description, embed_description
|
||||
));
|
||||
|
||||
ctx.send(CreateReply::default().embed(embed)).await?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue