[AB-55] fixing custom command not considering feature flag

ignoring case for custom command
This commit is contained in:
Sheldan
2022-08-28 23:24:08 +02:00
parent 30655dbfef
commit 82383449c0
5 changed files with 16 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ public class CommandReceivedHandler extends ListenerAdapter {
if(commandAlternatives != null) {
Optional<CommandAlternative> foundAlternativeOptional = commandAlternatives
.stream()
.filter(commandAlternative -> commandAlternative.matches(result.getParameter()))
.filter(commandAlternative -> commandAlternative.shouldExecute(result.getParameter(), event.getGuild()))
.findFirst();
if(foundAlternativeOptional.isPresent()) {
CommandAlternative foundAlternative = foundAlternativeOptional.get();