forked from sorceress/rustcord
Make pinned message formatting more condensed
This commit is contained in:
parent
a521516b5f
commit
f03c0a8cc3
|
@ -42,14 +42,15 @@ async fn pinned(ctx: &Context, message: &Message, mut args: Args) -> CommandResu
|
||||||
guild_id, &pinned[idx].channel_id, &pinned[idx].id
|
guild_id, &pinned[idx].channel_id, &pinned[idx].id
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: change link formatting
|
|
||||||
let _ = message
|
let _ = message
|
||||||
.channel_id
|
.channel_id
|
||||||
.send_message(&ctx.http, |m| {
|
.send_message(&ctx.http, |m| {
|
||||||
m.embed(|e| {
|
m.embed(|e| {
|
||||||
e.title(format!("Pinned message #{}", idx + 1))
|
e.title(format!("Pinned message #{}", idx + 1))
|
||||||
.description(&pinned[idx].content)
|
.description(&format!(
|
||||||
.field("🔗 link", format!("[original message]({})", msg_link), true)
|
"{}\n[**🔗 link**]({})",
|
||||||
|
&pinned[idx].content, msg_link
|
||||||
|
))
|
||||||
.timestamp(&pinned[idx].timestamp);
|
.timestamp(&pinned[idx].timestamp);
|
||||||
e.author(|a| {
|
e.author(|a| {
|
||||||
a.name(&pinned[idx].author.name)
|
a.name(&pinned[idx].author.name)
|
||||||
|
|
Loading…
Reference in New Issue