Skip to content

Commit

Permalink
do not check for membership on unverified and verified roles
Browse files Browse the repository at this point in the history
  • Loading branch information
AsianIntel committed Nov 6, 2024
1 parent b1d1faf commit 731e77f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rowifi_core/src/user/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,13 @@ impl UpdateUser<'_> {
let mut roles_to_remove = HashSet::<RoleId>::new();

for unverified_role in &self.guild.unverified_roles {
if self.server.roles.contains(unverified_role)
&& self.member.roles.contains(unverified_role)
{
if self.server.roles.contains(unverified_role) {
roles_to_remove.insert(*unverified_role);
}
}

for verified_role in &self.guild.verified_roles {
if self.server.roles.contains(verified_role)
&& !self.member.roles.contains(verified_role)
{
if self.server.roles.contains(verified_role) {
roles_to_add.insert(*verified_role);
}
}
Expand Down

0 comments on commit 731e77f

Please sign in to comment.