From 6b7ba2420aff49bbd3a6e90bb719e042a428f6ca Mon Sep 17 00:00:00 2001 From: Erisa A Date: Fri, 18 Jun 2021 23:14:02 +0100 Subject: [PATCH] Add alternative discord invite sites --- Modules/MessageEvent.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/MessageEvent.cs b/Modules/MessageEvent.cs index 8b5a82ae..3f2e35cf 100644 --- a/Modules/MessageEvent.cs +++ b/Modules/MessageEvent.cs @@ -167,7 +167,7 @@ public static async Task MessageHandlerAsync(DiscordClient client, DiscordMessag if (key == "autoban.txt" && Warnings.GetPermLevel(member) < ServerPermLevel.Tier4) { _ = message.DeleteAsync(); - await ModCmds.BanFromServerAsync(message.Author.Id, reason, client.CurrentUser.Id, message.Channel.Guild, 0, message.Channel, default, true); + await Bans.BanFromServerAsync(message.Author.Id, reason, client.CurrentUser.Id, message.Channel.Guild, 0, message.Channel, default, true); return; } @@ -215,7 +215,11 @@ public static async Task MessageHandlerAsync(DiscordClient client, DiscordMessag checkedMessage = checkedMessage.Replace("discord.gg/" + exclusion, "").Replace("discord.com/invite/" + exclusion, ""); } - if (checkedMessage.Contains("discord.gg/") || checkedMessage.Contains("discord.com/invite/")) + if (checkedMessage.Contains("discord.gg/") || + checkedMessage.Contains("discord.com/invite/") || + checkedMessage.Contains("dsc.gg/") || + checkedMessage.Contains("invite.gg/") + ) { string reason = "Sent an unapproved invite"; _ = message.DeleteAsync();