fix: clippy

This commit is contained in:
esy 2024-09-16 18:49:28 +01:00
parent c63945bb86
commit 7ed20108fb
No known key found for this signature in database

View file

@ -31,7 +31,7 @@ impl EventHandler for Handler {
Some(x) => x, Some(x) => x,
}; };
if let Ok(get_server_member) = get_server_member(&db, &new_member.guild_id, &new_member).await { if get_server_member(&db, &new_member.guild_id, &new_member).await.is_ok() {
let mut roles = vec![]; let mut roles = vec![];
if let Some(role) = &config.role_past { if let Some(role) = &config.role_past {
@ -49,8 +49,7 @@ impl EventHandler for Handler {
if let Err(e) = new_member.add_roles(&ctx, &roles).await { if let Err(e) = new_member.add_roles(&ctx, &roles).await {
println!("{:?}", e); println!("{:?}", e);
} }
} else { } else if let Some(name) = new_member.guild_id.name(&ctx) {
if let Some(name) = new_member.guild_id.name(&ctx) {
let msg = format!( let msg = format!(
"Welcome to the {} server! \n\ "Welcome to the {} server! \n\
Sign up on ulwolves and go to #bot_commands and do /link_wolves to get full access", Sign up on ulwolves and go to #bot_commands and do /link_wolves to get full access",
@ -62,7 +61,6 @@ impl EventHandler for Handler {
} }
} }
} }
}
async fn ready(&self, ctx: Context, ready: Ready) { async fn ready(&self, ctx: Context, ready: Ready) {
println!("[Main] {} is connected!", ready.user.name); println!("[Main] {} is connected!", ready.user.name);