mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03: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
|
||||
var kindaSanitized = new string(message.MessageRawHtmlDecoded
|
||||
.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 &&
|
||||
settings[BuiltIn.Keys.BotRespondToDiscordImpersonation].ToBoolean() &&
|
||||
(kindaSanitized.Contains("discord16.png") ||
|
||||
|
||||
Reference in New Issue
Block a user