fmt: fmt and clippy
This commit is contained in:
parent
11240914ac
commit
f3ef03a418
3 changed files with 49 additions and 54 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue