Actually fix deafened entry bug

This commit is contained in:
Noikoio 2019-03-08 19:00:42 -08:00
parent 1186ba1109
commit 301afe2c8d

View file

@ -39,7 +39,7 @@ namespace Noikoio.RegexBot.Module.VoiceRoleSync
// Replace roles only if the roles to be applied are different. // Replace roles only if the roles to be applied are different.
if (settingBefore != null && user.Roles.Contains(settingBefore)) await user.RemoveRoleAsync(settingBefore); if (settingBefore != null && user.Roles.Contains(settingBefore)) await user.RemoveRoleAsync(settingBefore);
if (settingAfter != null && !user.Roles.Contains(settingAfter) && if (settingAfter != null && !user.Roles.Contains(settingAfter) &&
(after.IsDeafened || after.IsSelfDeafened)) await user.AddRoleAsync(settingAfter); (!(after.IsDeafened || after.IsSelfDeafened))) await user.AddRoleAsync(settingAfter);
} }
} }
else else