mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
ref: make command methods closer
This commit is contained in:
parent
961e39d90a
commit
b62b94fa15
1 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue