From 889dd5175dfcdf3e2fb6482add2c202d8d95b4e4 Mon Sep 17 00:00:00 2001 From: Madpeterz <57852827+Madpeterz@users.noreply.github.com> Date: Thu, 8 Apr 2021 01:35:12 +0100 Subject: [PATCH] Update Inbound.cs --- BetterSecondbot/DiscordSupervisor/Inbound.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BetterSecondbot/DiscordSupervisor/Inbound.cs b/BetterSecondbot/DiscordSupervisor/Inbound.cs index 84c6201..dd9822e 100644 --- a/BetterSecondbot/DiscordSupervisor/Inbound.cs +++ b/BetterSecondbot/DiscordSupervisor/Inbound.cs @@ -118,7 +118,15 @@ namespace BetterSecondBot.DiscordSupervisor } if (controler.getBot().GetFullListOfCommandsWithCustoms().Contains(bits[0].ToLowerInvariant()) == true) { - string reply = controler.getBot().CallAPI(bits[0], args.Split("~#~"), target); + string reply = ""; + if (args == "") + { + reply = controler.getBot().CallAPI(bits[0], new string[] { }, target); + } + else + { + 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