Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions DiscordBot/Modules/UserSlashModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,12 @@ public async Task DuelAccept(string duelKey, string type)
var loser = challengerWins ? opponent : challenger;
if (type == "mute")
{
// Check if any user is an Admin
var isChallengerAdmin = challenger.GuildPermissions.Has(GuildPermission.Administrator);
var isOpponentAdmin = opponent.GuildPermissions.Has(GuildPermission.Administrator);
// If one of them is an admin, they automatically win (but not if both are admins)
if (isChallengerAdmin ^ isOpponentAdmin)
if (isChallengerAdmin || isOpponentAdmin)
{
winner = isChallengerAdmin ? challenger : opponent;
loser = isChallengerAdmin ? opponent : challenger;
// Unfair advantages are unfair. Also, bot can't mute admins. Remove the stakes.
type = "friendly";
}
}

Expand Down
Loading