Compare commits

...

8 commits

Author SHA1 Message Date
b848d1335e revert 1c5203f9b5
All checks were successful
Docker Compose Deploy / build_and_deploy (push) Successful in 3m0s
revert Merge pull request 'part 2: adding docker yml fix' (#3) from hotfix/ci-runner-fix into main

Reviewed-on: #3
2026-09-25 15:07:50 +00:00
1c5203f9b5 Merge pull request 'part 2: adding docker yml fix' (#3) from hotfix/ci-runner-fix into main
Some checks failed
Docker Compose Deploy / build_and_deploy (push) Failing after 23s
Reviewed-on: #3
2026-09-25 15:02:48 +00:00
liyunze
1e78b32dd8 adding docker yml fix
Some checks failed
CI / check (pull_request_target) Has been cancelled
2026-09-25 23:02:31 +08:00
b6023adc1e revert 61168a35f9
Some checks failed
Docker Compose Deploy / build_and_deploy (push) Has been cancelled
revert Merge pull request 'corrected CI label' (#2) from hotfix/ci-runner-fix into main

Reviewed-on: #2
2026-09-25 14:59:25 +00:00
61168a35f9 Merge pull request 'corrected CI label' (#2) from hotfix/ci-runner-fix into main
Some checks failed
Docker Compose Deploy / build_and_deploy (push) Failing after 42s
Reviewed-on: #2
2026-09-25 14:52:42 +00:00
liyunze
48e84af17b corrected CI label
Some checks failed
CI / check (pull_request_target) Has been cancelled
2026-09-25 22:51:22 +08:00
RythonDev
d24cc900d0 Merge pull request 'improved preview feature for faq and lock' (#5) from feature/better-preview into main
Some checks failed
Docker Compose Deploy / build_and_deploy (push) Has been cancelled
Reviewed-on: https://codeberg.org/RythonDev/portfolio-roast-bot/pulls/5
2026-09-25 08:31:57 +02:00
liyunze
bf4012f1f4 improved preview feature for faq and lock 2026-09-25 14:20:44 +08:00
2 changed files with 24 additions and 11 deletions

View file

@ -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!(
"```
{}
```",
&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?;

View file

@ -188,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!(
"```
{}
```",
&lock_message.description
"\
**Raw Text**\n\
```\n\
{}\
```\n\
**Preview:**\n\
{}",
&lock_message.description, embed_description
));
ctx.send(CreateReply::default().embed(embed)).await?;