ref: make command methods closer

This commit is contained in:
uburuntu 2020-08-11 15:09:04 +03:00
parent 961e39d90a
commit b62b94fa15

View file

@ -153,14 +153,6 @@ class Message(base.TelegramObject):
return ContentType.UNKNOWN
def is_command(self) -> bool:
"""
Check message text is command
:return: bool
"""
return self.text and self.text.startswith("/")
def is_forward(self) -> bool:
"""
Check that the message is forwarded.
@ -170,6 +162,14 @@ class Message(base.TelegramObject):
"""
return bool(self.forward_date)
def is_command(self) -> bool:
"""
Check message text is command
:return: bool
"""
return self.text and self.text.startswith("/")
def get_full_command(self) -> typing.Optional[typing.Tuple[str, str]]:
"""
Split command and args