fix: role_current needednt have been an Option
This commit is contained in:
parent
e9aed40f41
commit
11240914ac
4 changed files with 22 additions and 33 deletions
|
@ -42,10 +42,8 @@ impl EventHandler for Handler {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(role) = &config.role_current {
|
||||
if !new_member.roles.contains(role) {
|
||||
roles.push(role.to_owned());
|
||||
}
|
||||
if !new_member.roles.contains(&config.role_current) {
|
||||
roles.push(config.role_current.to_owned());
|
||||
}
|
||||
|
||||
if let Err(e) = new_member.add_roles(&ctx, &roles).await {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue