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];
|
target = bits[2];
|
||||||
}
|
}
|
||||||
string args = "";
|
string args = null;
|
||||||
if (bits.Length == 3)
|
if (bits.Length >= 2)
|
||||||
{
|
{
|
||||||
args = bits[1];
|
args = bits[1];
|
||||||
}
|
}
|
||||||
if (controler.getBot().GetFullListOfCommandsWithCustoms().Contains(bits[0].ToLowerInvariant()) == true)
|
if (controler.getBot().GetFullListOfCommandsWithCustoms().Contains(bits[0].ToLowerInvariant()) == true)
|
||||||
{
|
{
|
||||||
controler.getBot().CallAPI(bits[0], args.Split("~#~"), target);
|
string reply = controler.getBot().CallAPI(bits[0], args.Split("~#~"), target);
|
||||||
await MarkMessage(message, "✅").ConfigureAwait(false);
|
await message.Channel.SendMessageAsync(reply, false, null,null,null, new MessageReference(message.Id)).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue