Skip to content

Commit 561c422

Browse files
committed
Remove dead code for heartosoft restrictions
1 parent f90fff8 commit 561c422

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

Events/ReactionEvent.cs

-17
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,13 @@ public static async Task OnReaction(DiscordClient _, MessageReactionAddedEventAr
99
if (e.Emoji.Id != cfgjson.HeartosoftId || e.Channel.IsPrivate || e.Guild.Id != cfgjson.ServerID)
1010
return;
1111

12-
bool handled = false;
13-
1412
DiscordMessage targetMessage = await e.Channel.GetMessageAsync(e.Message.Id);
1513

16-
DiscordEmoji noHeartosoft = await e.Guild.GetEmojiAsync(cfgjson.NoHeartosoftId);
17-
1814
await Task.Delay(1000);
1915

2016
if (targetMessage.Author.Id == e.User.Id)
2117
{
2218
await targetMessage.DeleteReactionAsync(e.Emoji, e.User);
23-
handled = true;
24-
}
25-
26-
foreach (string word in cfgjson.RestrictedHeartosoftPhrases)
27-
{
28-
if (targetMessage.Content.ToLower().Contains(word))
29-
{
30-
if (!handled)
31-
await targetMessage.DeleteReactionAsync(e.Emoji, e.User);
32-
33-
await targetMessage.CreateReactionAsync(noHeartosoft);
34-
return;
35-
}
3619
}
3720
}
3821
}

Structs.cs

-6
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,6 @@ public class ConfigJson
149149
[JsonProperty("heartosoftId")]
150150
public ulong HeartosoftId { get; private set; }
151151

152-
[JsonProperty("noHeartosoftId")]
153-
public ulong NoHeartosoftId { get; private set; }
154-
155-
[JsonProperty("restrictedHeartosoftPhrases")]
156-
public List<string> RestrictedHeartosoftPhrases { get; private set; }
157-
158152
[JsonProperty("autoDehoistCharacters")]
159153
public string AutoDehoistCharacters { get; private set; }
160154

config.json

-3
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@
221221
984622268904779826
222222
],
223223
"heartosoftId": 413429915187281940,
224-
"noHeartosoftId": 642508756189446165,
225-
"restrictedHeartosoftPhrases": [
226-
],
227224
"autoDehoistCharacters": " !\"#$%&'()*+,-./:;<=>?@[\\]^_`'",
228225
"secondaryAutoDehoistCharacters": "0123456789",
229226
"hastebinEndpoint": "https://haste.erisa.uk",

0 commit comments

Comments
 (0)