fmt: fmt and clippy

This commit is contained in:
silver 2024-09-17 22:11:34 +01:00
parent 11240914ac
commit f3ef03a418
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
3 changed files with 49 additions and 54 deletions

View file

@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
use serenity::{
model::{
guild,
id::{GuildId, RoleId, ChannelId},
id::{ChannelId, GuildId, RoleId},
},
prelude::TypeMapKey,
};
@ -255,7 +255,7 @@ impl<'r> FromRow<'r, SqliteRow> for Servers {
Ok(x) => {
let tmp: i64 = x;
RoleId::from(tmp as u64)
}
}
_ => RoleId::from(0u64),
};
@ -409,13 +409,11 @@ pub mod set_roles {
}
}
if !member.roles.contains(role_current) {
roles_set[1] += 1;
roles.push(role_current.to_owned());
}
if let Err(e) = member.add_roles(ctx, &roles).await {
println!("{:?}", e);
}
@ -428,7 +426,6 @@ pub mod set_roles {
}
}
if member.roles.contains(role_current) {
roles_set[2] += 1;
// if theya re not a current member and have the role then remove it