Make pinned message formatting more condensed

This commit is contained in:
Agatha Lovelace 2020-11-22 23:20:06 +02:00
parent a521516b5f
commit f03c0a8cc3
No known key found for this signature in database
GPG Key ID: 2DB18BA2E0A80BC3
1 changed files with 4 additions and 3 deletions

View File

@ -42,14 +42,15 @@ async fn pinned(ctx: &Context, message: &Message, mut args: Args) -> CommandResu
guild_id, &pinned[idx].channel_id, &pinned[idx].id
);
// TODO: change link formatting
let _ = message
.channel_id
.send_message(&ctx.http, |m| {
m.embed(|e| {
e.title(format!("Pinned message #{}", idx + 1))
.description(&pinned[idx].content)
.field("🔗 link", format!("[original message]({})", msg_link), true)
.description(&format!(
"{}\n[**🔗 link**]({})",
&pinned[idx].content, msg_link
))
.timestamp(&pinned[idx].timestamp);
e.author(|a| {
a.name(&pinned[idx].author.name)