Skip to content

Commit

Permalink
fix(discord): revoke discord leader role on events (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomut0 authored Jan 6, 2024
1 parent b2c7d12 commit 1375679
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,7 @@ private Map<ClanPlayer, Member> getDiscordPlayers(@NotNull Clan clan) {
}

private void updateLeaderRole(@NotNull Member member, @NotNull ClanPlayer clanPlayer, DiscordAction action) {
if (!clanPlayer.isLeader()) {
return;
}

if (action == ADD) {
if (action == ADD && clanPlayer.isLeader()) {
guild.addRoleToMember(member, leaderRole).queue();
} else {
guild.removeRoleFromMember(member, leaderRole).queue();
Expand Down

0 comments on commit 1375679

Please sign in to comment.