Skip to content

Commit e32ca3a

Browse files
Dehoist: Add info log on BadRequestException
1 parent 9439c23 commit e32ca3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Helpers/DehoistHelpers.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ await targetMember.ModifyAsync(a =>
4848
});
4949
return true;
5050
}
51-
catch
51+
catch (Exception ex)
5252
{
53+
if (ex is DSharpPlus.Exceptions.BadRequestException)
54+
Program.discord.Logger.LogInformation(Program.CliptokEventID, "Failed to dehoist member {memberId}! Discord said Bad Request. If this member's nickname is in violation of AutoMod rules, this is expected!", targetMember.Id);
5355
return false;
5456
}
5557
}

0 commit comments

Comments
 (0)