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,
208
208
Example:
209
209
210
210
.. code-block:: python
211
+
211
212
@slash.subcommand(base="group", name="say")
212
213
async def _group_say(ctx, _str):
213
214
await ctx.send(content=_str)
@@ -289,7 +290,7 @@ async def on_socket_response(self, msg):
289
290
to_use = msg ["d" ]
290
291
if to_use ["data" ]["name" ] in self .commands .keys ():
291
292
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 )
293
294
if selected_cmd ["guild_ids" ]:
294
295
if ctx .guild .id not in selected_cmd ["guild_ids" ]:
295
296
return
Original file line number Diff line number Diff line change 3
3
from discord .ext import commands
4
4
from . import http
5
5
from . import error
6
- from .client import SlashCommand
7
6
8
7
9
8
class SlashContext :
@@ -30,7 +29,7 @@ def __init__(self,
30
29
_http : http .SlashCommandRequest ,
31
30
_json : dict ,
32
31
_discord : typing .Union [discord .Client , commands .Bot ],
33
- slashcommand : SlashCommand ):
32
+ slashcommand ):
34
33
self .__token = _json ["token" ]
35
34
self .name = _json ["data" ]["name" ]
36
35
self .interaction_id = _json ["id" ]
You can’t perform that action at this time.
0 commit comments