mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Cover Command filter
This commit is contained in:
parent
1cd993009e
commit
9d78e82f8c
7 changed files with 161 additions and 8 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import datetime
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from async_lru import alru_cache
|
||||
|
||||
from ..methods import (
|
||||
AddStickerToSet,
|
||||
AnswerCallbackQuery,
|
||||
|
|
@ -103,10 +105,9 @@ class Bot(BaseBot):
|
|||
Class where located all API methods
|
||||
"""
|
||||
|
||||
@alru_cache()
|
||||
async def me(self) -> User:
|
||||
if self not in self:
|
||||
self[self] = await self.get_me()
|
||||
return self[self]
|
||||
return await self.get_me()
|
||||
|
||||
# =============================================================================================
|
||||
# Group: Getting updates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue