Skip to content

Commit

Permalink
Add alternative discord invite sites
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Jun 18, 2021
1 parent b182cf2 commit 6b7ba24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Modules/MessageEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6b7ba24

Please sign in to comment.