Skip to content

Commit c69f7ae

Browse files
committed
Fixed type hint at SlashContext
1 parent 9ba8acb commit c69f7ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

discord_slash/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ class SlashContext:
1010
Context of the slash command.\n
1111
Kinda similar with discord.ext.commands.Context.
1212
13+
.. warning::
14+
Do not manually init this model.
15+
1316
:ivar name: Name of the command.
1417
:ivar interaction_id: Interaction ID of the command message.
1518
:ivar command_id: ID of the command.
@@ -24,7 +27,7 @@ class SlashContext:
2427
def __init__(self,
2528
_http: http.SlashCommandRequest,
2629
_json: dict,
27-
_discord: commands.Bot):
30+
_discord: typing.Union[discord.Client, commands.Bot]):
2831
self.__token = _json["token"]
2932
self.name = _json["data"]["name"]
3033
self.interaction_id = _json["id"]

0 commit comments

Comments
 (0)