mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Try to use contextvars (partial)
This commit is contained in:
parent
c88ee7ed52
commit
8086a120c2
7 changed files with 54 additions and 7 deletions
|
|
@ -137,8 +137,8 @@ class TelegramObject(metaclass=MetaTelegramObject):
|
|||
|
||||
@property
|
||||
def bot(self):
|
||||
from ..dispatcher import ctx
|
||||
return ctx.get_bot()
|
||||
from ..bot.bot import Bot
|
||||
return Bot.current()
|
||||
|
||||
def to_python(self) -> typing.Dict:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue