From 7130fd9e63406471abdcc1966ff7caa7a12e2510 Mon Sep 17 00:00:00 2001 From: hhvrc Date: Mon, 16 Sep 2024 17:02:49 +0200 Subject: [PATCH] Interesting proposal test --- DiscordBot/MessageHandler/MessageHandler.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DiscordBot/MessageHandler/MessageHandler.cs b/DiscordBot/MessageHandler/MessageHandler.cs index 3abfa9f..de9896c 100644 --- a/DiscordBot/MessageHandler/MessageHandler.cs +++ b/DiscordBot/MessageHandler/MessageHandler.cs @@ -39,6 +39,14 @@ public async Task HandleMessageAsync(SocketMessage message) bool isInBotChannel = message.Channel.Id == 1114123393567047730; + // Check if message starts with the lightning bolt emoji and mentions a user + if (message.Content.StartsWith(":zap:") && message.MentionedUsers.Count > 0) + { + // Checkmark the message + await message.AddReactionAsync(new Emoji("✅")); + return; + } + // Check if the message contains a swear word if (ProfanityDetector.TryGetProfanityWeight(message.Content, out int count, out float weight)) {