Update Inbound.cs
improve / fix discord inbound
This commit is contained in:
parent
4f93c8f312
commit
242ea5b7fa
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue