From 65794edf2c1fd4ac1828c977f038ea670bace288 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 29 Mar 2018 19:38:23 +0200 Subject: [PATCH] Fix for empty messages --- DeukBot4/MessageHandlers/CommandHandler/CommandHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DeukBot4/MessageHandlers/CommandHandler/CommandHandler.cs b/DeukBot4/MessageHandlers/CommandHandler/CommandHandler.cs index e78a461..c9ed185 100644 --- a/DeukBot4/MessageHandlers/CommandHandler/CommandHandler.cs +++ b/DeukBot4/MessageHandlers/CommandHandler/CommandHandler.cs @@ -38,6 +38,9 @@ namespace DeukBot4.MessageHandlers.CommandHandler public static async Task HandleMessage(SocketMessage message) { + if (string.IsNullOrWhiteSpace(message.Content)) + return; + if (message.Content[0] != CommandTrigger) return; var req = await CommandRequest.Create(message); var resultCode = req.Item2;