|
|
@ -149,11 +149,7 @@ pub async fn submit(ctx: Context<'_>, submission: serenity::Attachment) -> Resul
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let username = if author.discriminator == 0 { // new usernames
|
|
|
|
let username = author.username();
|
|
|
|
author.name.clone()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
format!("{}#{}", author.name, author.discriminator)
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
let username = &username;
|
|
|
|
let username = &username;
|
|
|
|
if !existing_submitter {
|
|
|
|
if !existing_submitter {
|
|
|
|
let mut submitter_data = Map::new();
|
|
|
|
let mut submitter_data = Map::new();
|
|
|
@ -470,7 +466,6 @@ pub async fn suggest(
|
|
|
|
am
|
|
|
|
am
|
|
|
|
});
|
|
|
|
});
|
|
|
|
m.embed(|e| {
|
|
|
|
m.embed(|e| {
|
|
|
|
let username = format!("{}#{}", author.name, author.discriminator);
|
|
|
|
|
|
|
|
e.title("New suggestion");
|
|
|
|
e.title("New suggestion");
|
|
|
|
e.description(if let Context::Prefix(ctx) = ctx {
|
|
|
|
e.description(if let Context::Prefix(ctx) = ctx {
|
|
|
|
format!("{suggestion}\n\n[See original message]({})", ctx.msg.link(),)
|
|
|
|
format!("{suggestion}\n\n[See original message]({})", ctx.msg.link(),)
|
|
|
@ -480,7 +475,7 @@ pub async fn suggest(
|
|
|
|
let mut embed_author = serenity::builder::CreateEmbedAuthor::default();
|
|
|
|
let mut embed_author = serenity::builder::CreateEmbedAuthor::default();
|
|
|
|
embed_author
|
|
|
|
embed_author
|
|
|
|
.icon_url(get_avatar(author))
|
|
|
|
.icon_url(get_avatar(author))
|
|
|
|
.name(username)
|
|
|
|
.name(author.username())
|
|
|
|
.url(format!("https://discord.com/users/{}", author.id));
|
|
|
|
.url(format!("https://discord.com/users/{}", author.id));
|
|
|
|
e.set_author(embed_author);
|
|
|
|
e.set_author(embed_author);
|
|
|
|
if let Some(accent_color) = accent_color {
|
|
|
|
if let Some(accent_color) = accent_color {
|
|
|
|