Fix CommandRegistry state initialization

This commit is contained in:
Reinier van der Leer
2023-07-09 20:29:33 +02:00
parent 51d8b43fbf
commit 050c52a008

View File

@@ -15,8 +15,12 @@ class CommandRegistry:
directory.
"""
commands: dict[str, Command] = {}
commands_aliases: dict[str, Command] = {}
commands: dict[str, Command]
commands_aliases: dict[str, Command]
def __init__(self):
self.commands = {}
self.commands_aliases = {}
def __contains__(self, command_name: str):
return command_name in self.commands or command_name in self.commands_aliases