mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add missing shortcuts, new enums, reworked old stuff (#1070)
* Render shortcuts * Render docs * Added enumerations * Added docs * Use enums, removed Helper * Bump butcher * Added InputMediaType enum * Added MaskPositionPoint, InlineQueryResultType enums * Update texts * Added StickerType enum * Cover tests * Update docs * Fixed imports * Re-enabled all pre-commit hooks
This commit is contained in:
parent
3438d2446d
commit
3ea73fbbbd
370 changed files with 19735 additions and 8380 deletions
|
|
@ -175,10 +175,6 @@ T = TypeVar("T")
|
|||
|
||||
|
||||
class Bot(ContextInstanceMixin["Bot"]):
|
||||
"""
|
||||
Bot class
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
token: str,
|
||||
|
|
@ -186,6 +182,8 @@ class Bot(ContextInstanceMixin["Bot"]):
|
|||
parse_mode: Optional[str] = None,
|
||||
) -> None:
|
||||
"""
|
||||
Bot class
|
||||
|
||||
:param token: Telegram Bot token `Obtained from @BotFather <https://t.me/BotFather>`_
|
||||
:param session: HTTP Client session (For example AiohttpSession).
|
||||
If not specified it will be automatically created.
|
||||
|
|
@ -234,6 +232,11 @@ class Bot(ContextInstanceMixin["Bot"]):
|
|||
self.reset_current(token)
|
||||
|
||||
async def me(self) -> User:
|
||||
"""
|
||||
Cached alias for getMe method
|
||||
|
||||
:return:
|
||||
"""
|
||||
if self._me is None: # pragma: no cover
|
||||
self._me = await self.get_me()
|
||||
return self._me
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue