Skip to content

Commit 89b2e68

Browse files
committed
Remove code for autoban ID sets
1 parent 561c422 commit 89b2e68

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

Events/MemberEvents.cs

-23
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,6 @@ public static async Task GuildMemberAdded(DiscordClient client, GuildMemberAdded
7272
var _ = BanHelpers.BanSilently(e.Guild, e.Member.Id, "Secret sauce");
7373
await LogChannelHelper.LogMessageAsync("investigations", $"{cfgjson.Emoji.Banned} Raid-banned {e.Member.Mention} for matching avatar: {e.Member.AvatarUrl.Replace("1024", "128")}");
7474
}
75-
76-
string banDM = $"You have been automatically banned from **{e.Guild.Name}** for matching patterns of known raiders.\n" +
77-
$"Please send an appeal and you will be unbanned as soon as possible: {cfgjson.AppealLink}\n" +
78-
$"The requirements for appeal can be ignored in this case. Sorry for any inconvenience caused.";
79-
80-
foreach (var IdAutoBanSet in cfgjson.AutoBanIds)
81-
{
82-
if (db.HashExists(IdAutoBanSet.Name, e.Member.Id))
83-
{
84-
continue;
85-
}
86-
87-
if (e.Member.Id > IdAutoBanSet.LowerBound && e.Member.Id < IdAutoBanSet.UpperBound)
88-
{
89-
await e.Member.SendMessageAsync(banDM);
90-
91-
await e.Member.BanAsync(TimeSpan.FromDays(7), "Matching patterns of known raiders, please unban if appealed.");
92-
93-
await LogChannelHelper.LogMessageAsync("investigations", $"{cfgjson.Emoji.Banned} Automatically appeal-banned {e.Member.Mention} for matching the creation date of the {IdAutoBanSet.Name} DM scam raiders.");
94-
}
95-
96-
db.HashSet(IdAutoBanSet.Name, e.Member.Id, true);
97-
}
9875
}
9976

10077
// Restore user overrides stored in db (if there are any)

Structs.cs

-16
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ public class ConfigJson
188188
[JsonProperty("modmailCategory")]
189189
public ulong ModmailCategory { get; private set; }
190190

191-
[JsonProperty("autoBanIds")]
192-
public List<AutoBanIdSet> AutoBanIds { get; private set; }
193-
194191
[JsonProperty("lineLimit")]
195192
public int LineLimit { get; private set; }
196193

@@ -346,19 +343,6 @@ public class WordListJson
346343
[JsonProperty("channelId")]
347344
public ulong? ChannelId { get; private set; }
348345
}
349-
350-
public class AutoBanIdSet
351-
{
352-
[JsonProperty("name")]
353-
public string Name { get; private set; }
354-
355-
[JsonProperty("upperBound")]
356-
public ulong UpperBound { get; private set; }
357-
358-
[JsonProperty("lowerBound")]
359-
public ulong LowerBound { get; private set; }
360-
}
361-
362346
public class EmojiJson
363347
{
364348
[JsonProperty("noPermissions")]

config.json

-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@
235235
"giveaways": 1169336992455200820
236236
},
237237
"modmailCategory": 536572162450915340,
238-
"autobanIds": [
239-
],
240238
"lineLimit": 30,
241239
"increasedLineLimit": 1000,
242240
"lineLimitTier": 3,

0 commit comments

Comments
 (0)