mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +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
|
@property
|
||||||
def mention(self):
|
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
|
:return: str
|
||||||
"""
|
"""
|
||||||
|
|
@ -47,7 +48,7 @@ class User(base.TelegramObject):
|
||||||
@property
|
@property
|
||||||
def locale(self) -> 'babel.core.Locale' or None:
|
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`
|
:return: :class:`babel.core.Locale`
|
||||||
:raise: ImportError: when babel is not installed.
|
:raise: ImportError: when babel is not installed.
|
||||||
|
|
@ -79,9 +80,9 @@ class User(base.TelegramObject):
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return self.id + \
|
return self.id + \
|
||||||
hash(self.is_bot) + \
|
hash(self.is_bot) + \
|
||||||
hash(self.full_name) + \
|
hash(self.full_name) + \
|
||||||
(hash(self.username) if self.username else 0)
|
(hash(self.username) if self.username else 0)
|
||||||
|
|
||||||
def __int__(self):
|
def __int__(self):
|
||||||
return self.id
|
return self.id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue