This should fix weird issue where command is parsed wrong

This commit is contained in:
Deukhoofd 2018-10-22 10:41:44 +02:00
parent 06c0bf1429
commit 9fd8908ffe
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
2 changed files with 1 additions and 4 deletions

View File

@ -13,7 +13,7 @@ namespace DeukBot4.MessageHandlers.CommandHandler.RequestStructure
public class CommandRequest
{
private static readonly string CommandNamePattern =
"(?:" + CommandHandler.CommandTrigger + "+|<@!?\\d*> !*)([^ ]+) *(.*)";
"(?:<@!?\\d*> !*|^" + CommandHandler.CommandTrigger + "+)([^ ]+) *(.*)";
private static readonly Regex CommandNameMatcher = new Regex(CommandNamePattern);
public Command Command { get; }

View File

@ -76,9 +76,6 @@ namespace DeukBot4
}
BotId = Client.CurrentUser.Id;
IsConnected = true;
var channel = (ITextChannel)Client.GetChannel(169864553801318400);
var message = await channel.GetMessageAsync(499974464197623828);
}
}
}