We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c209d5 commit 0a35940Copy full SHA for 0a35940
botbase/wraps/context.py
@@ -1,17 +1,21 @@
1
from __future__ import annotations
2
3
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Generic
4
5
from nextcord.ext.commands import Context
6
7
+
8
from . import wrap
9
10
if TYPE_CHECKING:
11
from ..botbase import BotBase
12
+ from typing import TypeVar
13
14
+ B = TypeVar("B", bound=BotBase)
15
16
-class MyContext(Context, wrap.Wrap):
- bot: BotBase
17
+class MyContext(Context, wrap.Wrap, Generic["B"]):
18
+ bot: B
19
20
def __init__(self, *args, **kwargs):
21
super().__init__(*args, **kwargs)
0 commit comments