mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 14:15:51 +00:00
Remove old member role if present, else welcome
This commit is contained in:
parent
550080482c
commit
4a066e4f00
|
@ -261,7 +261,9 @@ pub(crate) async fn login_6(
|
|||
})
|
||||
})
|
||||
.await?;
|
||||
if !mm.roles.contains(&data.old_member) {
|
||||
if mm.roles.contains(&data.old_member) {
|
||||
crate::verify::remove_role(ctx, &mut mm, data.old_member).await?;
|
||||
} else {
|
||||
crate::verify::welcome_user(&ctx.http, &data.gn_ch_id, &m.user, fresher)
|
||||
.await?;
|
||||
}
|
||||
|
|
|
@ -252,7 +252,9 @@ pub(crate) async fn manual_4(
|
|||
})
|
||||
})
|
||||
.await?;
|
||||
if !member.roles.contains(&data.old_member) {
|
||||
if member.roles.contains(&data.old_member) {
|
||||
crate::verify::remove_role(ctx, &mut member, data.old_member).await?;
|
||||
} else {
|
||||
crate::verify::welcome_user(&ctx.http, &data.gn_ch_id, &user, fresher).await?;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,9 @@ pub(crate) async fn membership_3(
|
|||
})
|
||||
})
|
||||
.await?;
|
||||
if !mm.roles.contains(&data.old_member) {
|
||||
if mm.roles.contains(&data.old_member) {
|
||||
crate::verify::remove_role(ctx, &mut mm, data.old_member).await?;
|
||||
} else {
|
||||
crate::verify::welcome_user(&ctx.http, &data.gn_ch_id, &m.user, fresher)
|
||||
.await?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue