You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(message.MentionedUsersis not null&&message.MentionedUsers.Count>Program.cfgjson.MassMentionBanThreshold)
284
289
{
285
-
if(!wasAutoModBlock)
290
+
if(wasAutoModBlock)
291
+
{
292
+
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered mass-mention filter",message.Channel.Id,message.Author.Id);
293
+
}
294
+
else
295
+
{
296
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered mass-mention filter",message.Id,message.Channel.Id,message.Author.Id);
286
297
_=message.DeleteAsync();
298
+
}
299
+
287
300
_=channel.Guild.BanMemberAsync(message.Author,TimeSpan.FromDays(7),$"Mentioned more than {Program.cfgjson.MassMentionBanThreshold} users in one message.");
288
301
stringcontent=$"{Program.cfgjson.Emoji.Banned}{message.Author.Mention} was automatically banned for mentioning **{message.MentionedUsers.Count}** users.";
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered word list filter",message.Channel.Id,message.Author.Id);
324
+
else
325
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered word list filter",message.Id,message.Channel.Id,message.Author.Id);
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered unapproved invite filter",message.Channel.Id,message.Author.Id);
374
+
}
375
+
else
376
+
{
377
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered unapproved invite filter",message.Id,message.Channel.Id,message.Author.Id);
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered mass emoji filter",message.Channel.Id,message.Author.Id);
539
+
}
540
+
else
541
+
{
542
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered mass emoji filter",message.Id,message.Channel.Id,message.Author.Id);
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered phishing message filter",message.Channel.Id,message.Author.Id);
639
+
}
640
+
else
641
+
{
642
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered phishing message filter",message.Id,message.Channel.Id,message.Author.Id);
603
643
_=message.DeleteAsync();
644
+
}
645
+
604
646
stringreason="Sending phishing URL(s)";
605
647
DiscordMessagemsg=awaitmessage.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Denied}{message.Author.Mention} was automatically warned: **{reason.Replace("`","\\`").Replace("*","\\*")}**");
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered everyone/here mention filter",message.Channel.Id,message.Author.Id);
665
+
}
666
+
else
667
+
{
668
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered everyone/here mention filter",message.Id,message.Channel.Id,message.Author.Id);
622
669
_=message.DeleteAsync();
670
+
}
671
+
672
+
stringreason="Attempted to ping everyone/here";
623
673
DiscordMessagemsg=awaitmessage.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Denied}{message.Author.Mention} was automatically warned: **{reason.Replace("`","\\`").Replace("*","\\*")}**");
if(message.MentionedUsersis not null&&message.MentionedUsers.Count>=Program.cfgjson.MassMentionThreshold&&GetPermLevel(member)<ServerPermLevel.Tier3)
631
681
{
682
+
if(wasAutoModBlock)
683
+
{
684
+
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered mass mention filter",message.Channel.Id,message.Author.Id);
685
+
}
686
+
else
687
+
{
688
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered mass mention filter",message.Id,message.Channel.Id,message.Author.Id);
stringreason="Too many lines in a single message";
659
-
if(!wasAutoModBlock)
717
+
if(wasAutoModBlock)
718
+
{
719
+
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered line limit filter",message.Channel.Id,message.Author.Id);
720
+
}
721
+
else
722
+
{
723
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered line limit filter",message.Id,message.Channel.Id,message.Author.Id);
660
724
_=message.DeleteAsync();
725
+
}
726
+
727
+
stringreason="Too many lines in a single message";
Program.discord.Logger.LogDebug("AutoMod-blocked message in {channelId} by user {userId} triggered no filters!",message.Channel.Id,message.Author.Id);
898
+
else
899
+
Program.discord.Logger.LogDebug("Message {messageId} in {channelId} by user {userId} triggered no filters!",message.Id,message.Channel.Id,message.Author.Id);
0 commit comments