Skip to content

Commit

Permalink
Ignore banned users from getCurrentVoiceMembers (#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism authored Jan 21, 2024
1 parent b74e0eb commit ebee0bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helpers/discord_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,9 @@ export function getCurrentVoiceMembers(
return [];
}

return voiceChannel.voiceMembers.filter((x) => !x.bot);
return voiceChannel.voiceMembers
.filter((x) => !x.bot)
.filter((x) => !State.bannedPlayers.has(x.id));
}

/**
Expand Down

0 comments on commit ebee0bf

Please sign in to comment.