mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Don't ignore edits if it's within 15 seconds of being sent
This commit is contained in:
@@ -440,7 +440,8 @@ public class ChatBot
|
|||||||
// Strip weird control characters and just allow basic punctuation + whitespace
|
// Strip weird control characters and just allow basic punctuation + whitespace
|
||||||
var kindaSanitized = new string(message.MessageRawHtmlDecoded
|
var kindaSanitized = new string(message.MessageRawHtmlDecoded
|
||||||
.Where(c => c == ' ' || char.IsPunctuation(c) || char.IsLetter(c) || char.IsDigit(c)).ToArray());
|
.Where(c => c == ' ' || char.IsPunctuation(c) || char.IsLetter(c) || char.IsDigit(c)).ToArray());
|
||||||
if (message.MessageEditDate == null && message.Author.Id != settings[BuiltIn.Keys.GambaSeshUserId].ToType<int>() &&
|
if ((message.MessageEditDate == null || message.MessageDate > DateTimeOffset.UtcNow.AddSeconds(-15))
|
||||||
|
&& message.Author.Id != settings[BuiltIn.Keys.GambaSeshUserId].ToType<int>() &&
|
||||||
message.Author.Username != settings[BuiltIn.Keys.KiwiFarmsUsername].Value &&
|
message.Author.Username != settings[BuiltIn.Keys.KiwiFarmsUsername].Value &&
|
||||||
settings[BuiltIn.Keys.BotRespondToDiscordImpersonation].ToBoolean() &&
|
settings[BuiltIn.Keys.BotRespondToDiscordImpersonation].ToBoolean() &&
|
||||||
(kindaSanitized.Contains("discord16.png") ||
|
(kindaSanitized.Contains("discord16.png") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user