mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 22:25:51 +00:00
Remove non-member
role when user is verified
This commit is contained in:
parent
1fc926a989
commit
b93194e57f
|
@ -261,6 +261,7 @@ pub(crate) async fn login_6(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
let _ = mm.remove_role(&ctx.http, data.non_member).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?;
|
crate::verify::remove_role(ctx, &mut mm, data.old_member).await?;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -252,6 +252,7 @@ pub(crate) async fn manual_4(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
let _ = member.remove_role(&ctx.http, data.non_member).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?;
|
crate::verify::remove_role(ctx, &mut member, data.old_member).await?;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -181,6 +181,7 @@ pub(crate) async fn membership_3(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
let _ = mm.remove_role(&ctx.http, data.non_member).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?;
|
crate::verify::remove_role(ctx, &mut mm, data.old_member).await?;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue