mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 09:55:21 +00:00
Minor typos fix
This commit is contained in:
parent
f9c44bb2d7
commit
11fc718c40
1 changed files with 6 additions and 5 deletions
|
|
@ -36,7 +36,8 @@ class User(base.TelegramObject):
|
|||
@property
|
||||
def mention(self):
|
||||
"""
|
||||
You can get mention to user (If user have username, otherwise return full name)
|
||||
You can get user's username to mention him
|
||||
Full name will be returned if user has no username
|
||||
|
||||
:return: str
|
||||
"""
|
||||
|
|
@ -47,7 +48,7 @@ class User(base.TelegramObject):
|
|||
@property
|
||||
def locale(self) -> 'babel.core.Locale' or None:
|
||||
"""
|
||||
This property require `Babel <https://pypi.python.org/pypi/Babel>`_ module
|
||||
This property requires `Babel <https://pypi.python.org/pypi/Babel>`_ module
|
||||
|
||||
:return: :class:`babel.core.Locale`
|
||||
:raise: ImportError: when babel is not installed.
|
||||
|
|
@ -79,9 +80,9 @@ class User(base.TelegramObject):
|
|||
|
||||
def __hash__(self):
|
||||
return self.id + \
|
||||
hash(self.is_bot) + \
|
||||
hash(self.full_name) + \
|
||||
(hash(self.username) if self.username else 0)
|
||||
hash(self.is_bot) + \
|
||||
hash(self.full_name) + \
|
||||
(hash(self.username) if self.username else 0)
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue