Resolve suggestions

This commit is contained in:
WasserEsser 2021-03-13 14:07:41 +01:00 committed by Szymon Uglis
parent b23113d0cd
commit c6354186c2
No known key found for this signature in database
GPG key ID: 112376C5BEE91FE2

View file

@ -105,16 +105,10 @@ class Commander with ICommandRegistrable {
// Example: (?<finalCommand>(quote|q) (remove|rm))
// This will match the command `quote remove`, `q remove`, `quote rm` and `q rm`
final match = RegExp("(?<finalCommand>${matchingCommand.getFullCommandMatch()})").firstMatch(
event.message.content,
);
final match = RegExp("(?<finalCommand>${matchingCommand.getFullCommandMatch()})").firstMatch(event.message.content);
final finalCommand = match?.namedGroup("finalCommand");
if (finalCommand == null) {
return;
}
// construct commandcontext
final context = CommandContext._new(
event.message.channel.getFromCache()!,