File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ def subcommand(self,
208208 Example:
209209
210210 .. code-block:: python
211+
211212 @slash.subcommand(base="group", name="say")
212213 async def _group_say(ctx, _str):
213214 await ctx.send(content=_str)
@@ -289,7 +290,7 @@ async def on_socket_response(self, msg):
289290 to_use = msg ["d" ]
290291 if to_use ["data" ]["name" ] in self .commands .keys ():
291292 selected_cmd = self .commands [to_use ["data" ]["name" ]]
292- ctx = model .SlashContext (self .req , to_use , self ._discord )
293+ ctx = model .SlashContext (self .req , to_use , self ._discord , self )
293294 if selected_cmd ["guild_ids" ]:
294295 if ctx .guild .id not in selected_cmd ["guild_ids" ]:
295296 return
Original file line number Diff line number Diff line change 33from discord .ext import commands
44from . import http
55from . import error
6- from .client import SlashCommand
76
87
98class SlashContext :
@@ -30,7 +29,7 @@ def __init__(self,
3029 _http : http .SlashCommandRequest ,
3130 _json : dict ,
3231 _discord : typing .Union [discord .Client , commands .Bot ],
33- slashcommand : SlashCommand ):
32+ slashcommand ):
3433 self .__token = _json ["token" ]
3534 self .name = _json ["data" ]["name" ]
3635 self .interaction_id = _json ["id" ]
You can’t perform that action at this time.
0 commit comments