From 242ea5b7faf9c4a33aeea9cbeeccfecd7d2beaf7 Mon Sep 17 00:00:00 2001 From: Madpeterz <57852827+Madpeterz@users.noreply.github.com> Date: Fri, 2 Apr 2021 20:50:22 +0100 Subject: [PATCH] Update Inbound.cs improve / fix discord inbound --- BetterSecondbot/DiscordSupervisor/Inbound.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BetterSecondbot/DiscordSupervisor/Inbound.cs b/BetterSecondbot/DiscordSupervisor/Inbound.cs index 4a30a5e..05ebe7d 100644 --- a/BetterSecondbot/DiscordSupervisor/Inbound.cs +++ b/BetterSecondbot/DiscordSupervisor/Inbound.cs @@ -111,15 +111,15 @@ namespace BetterSecondBot.DiscordSupervisor { target = bits[2]; } - string args = ""; - if (bits.Length == 3) + string args = null; + if (bits.Length >= 2) { args = bits[1]; } if (controler.getBot().GetFullListOfCommandsWithCustoms().Contains(bits[0].ToLowerInvariant()) == true) { - controler.getBot().CallAPI(bits[0], args.Split("~#~"), target); - await MarkMessage(message, "✅").ConfigureAwait(false); + string reply = controler.getBot().CallAPI(bits[0], args.Split("~#~"), target); + await message.Channel.SendMessageAsync(reply, false, null,null,null, new MessageReference(message.Id)).ConfigureAwait(false); } else {