mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 14:15:51 +00:00
Remove redundant avatar_url
code
This commit is contained in:
parent
fbd6b14b79
commit
ba2c820d81
|
@ -1,4 +1,4 @@
|
|||
use crate::{db, verify, ACtx, Error};
|
||||
use crate::{db, ACtx, Error};
|
||||
use poise::{
|
||||
serenity_prelude::{self as serenity, CreateEmbed, CreateMessage},
|
||||
CreateReply,
|
||||
|
@ -31,7 +31,7 @@ pub(crate) async fn nick(
|
|||
CreateMessage::new().embed(
|
||||
CreateEmbed::new()
|
||||
.title("Nick updated")
|
||||
.thumbnail(u.avatar_url().unwrap_or(verify::AVATAR.to_string()))
|
||||
.thumbnail(u.face())
|
||||
.description(u.to_string())
|
||||
.field("Old Nick", old_nickname, true)
|
||||
.field("New Nick", nickname, true)
|
||||
|
|
|
@ -239,9 +239,7 @@ pub(crate) async fn login_6(
|
|||
&ctx.http,
|
||||
CreateMessage::new().embed(
|
||||
CreateEmbed::new()
|
||||
.thumbnail(
|
||||
m.user.avatar_url().unwrap_or(super::AVATAR.to_string()),
|
||||
)
|
||||
.thumbnail(m.user.face())
|
||||
.title("Member verified via login")
|
||||
.description(m.user.to_string())
|
||||
.field("Fresher", fresher.to_string(), true)
|
||||
|
|
|
@ -129,7 +129,7 @@ pub(crate) async fn manual_3(
|
|||
.embed(
|
||||
CreateEmbed::new()
|
||||
.title("New verification request from")
|
||||
.thumbnail(m.user.avatar_url().unwrap_or(super::AVATAR.to_string()))
|
||||
.thumbnail(m.user.face())
|
||||
.description(m.user.to_string())
|
||||
.field("Real Name (To be checked)", &realname, true)
|
||||
.field("Imperial Shortcode (To be checked", &shortcode, true)
|
||||
|
@ -246,9 +246,7 @@ pub(crate) async fn manual_4(
|
|||
.components(vec![])
|
||||
.embed(
|
||||
CreateEmbed::new()
|
||||
.thumbnail(
|
||||
user.avatar_url().unwrap_or(super::AVATAR.to_string()),
|
||||
)
|
||||
.thumbnail(user.face())
|
||||
.title("Member verified via manual")
|
||||
.description(user.to_string())
|
||||
.field("Fresher", fresher.to_string(), true)
|
||||
|
@ -290,7 +288,7 @@ pub(crate) async fn manual_4(
|
|||
CreateEmbed::new()
|
||||
.title("Member denied via manual")
|
||||
.description(user.to_string())
|
||||
.thumbnail(user.avatar_url().unwrap_or(super::AVATAR.to_string()))
|
||||
.thumbnail(user.face())
|
||||
.timestamp(serenity::Timestamp::now()),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -179,7 +179,7 @@ pub(crate) async fn membership_3(
|
|||
&ctx.http,
|
||||
CreateMessage::new().embed(
|
||||
CreateEmbed::new()
|
||||
.thumbnail(m.user.avatar_url().unwrap_or(super::AVATAR.to_string()))
|
||||
.thumbnail(m.user.face())
|
||||
.title("Member verified via membership")
|
||||
.description(m.user.to_string())
|
||||
.field("Fresher", fresher.to_string(), true)
|
||||
|
|
|
@ -13,8 +13,6 @@ pub(crate) use membership::*;
|
|||
pub(crate) mod manual;
|
||||
pub(crate) use manual::*;
|
||||
|
||||
pub(crate) const AVATAR: &str = "https://cdn.discordapp.com/embed/avatars/0.png";
|
||||
|
||||
const INFO_MSG: &str = indoc::indoc! {"
|
||||
Nano is a Discord bot written with serenity-rs/poise and tokio-rs/axum.
|
||||
|
||||
|
|
Loading…
Reference in a new issue