Rename normmal_command to message_command

This commit is contained in:
Gnome 2021-09-01 12:45:39 +01:00
parent 5a49e1bf68
commit 667c8e7caa

View File

@ -331,7 +331,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
self.callback = func self.callback = func
self.enabled: bool = kwargs.get('enabled', True) self.enabled: bool = kwargs.get('enabled', True)
self.slash_command: Optional[bool] = kwargs.get("slash_command", None) self.slash_command: Optional[bool] = kwargs.get("slash_command", None)
self.normal_command: Optional[bool] = kwargs.get("normal_command", None) self.message_command: Optional[bool] = kwargs.get("message_command", None)
help_doc = kwargs.get('help') help_doc = kwargs.get('help')
if help_doc is not None: if help_doc is not None:
@ -1126,7 +1126,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
and self.slash_command is False and self.slash_command is False
) or ( ) or (
ctx.interaction is None ctx.interaction is None
and self.normal_command is False and self.message_command is False
): ):
raise DisabledCommand(f'{self.name} command is disabled') raise DisabledCommand(f'{self.name} command is disabled')