diff --git a/aiogram/filters/command.py b/aiogram/filters/command.py index b590ba67..f3df8bfc 100644 --- a/aiogram/filters/command.py +++ b/aiogram/filters/command.py @@ -164,7 +164,12 @@ class Command(Filter): result = allowed_command.match(command.command) if result: return replace(command, regexp_match=result) - elif command.command == allowed_command: # String + + command_name = command.command + if self.ignore_case: + command_name, allowed_command = map(str.casefold, (command_name, allowed_command)) + + if command_name == allowed_command: # String return command raise CommandException("Command did not match pattern")