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