mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Context instance mixin for BaseBot
This commit is contained in:
parent
49526814d9
commit
54a77b369e
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
|
from ...utils.mixins import ContextInstanceMixin
|
||||||
from ..methods import TelegramMethod
|
from ..methods import TelegramMethod
|
||||||
from ..session.aiohttp import AiohttpSession
|
from ..session.aiohttp import AiohttpSession
|
||||||
from ..session.base import BaseSession
|
from ..session.base import BaseSession
|
||||||
|
|
@ -7,7 +8,7 @@ from ..session.base import BaseSession
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
||||||
class BaseBot:
|
class BaseBot(ContextInstanceMixin):
|
||||||
def __init__(self, token: str, session: BaseSession = None):
|
def __init__(self, token: str, session: BaseSession = None):
|
||||||
if session is None:
|
if session is None:
|
||||||
session = AiohttpSession()
|
session = AiohttpSession()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue