Skip to content

Commit 789ad95

Browse files
committed
Add type-checking to selected_command
Only occurs if the name in question is "context".
1 parent 956f5a4 commit 789ad95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord_slash/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,9 @@ async def _on_slash(self, to_use): # slash commands only.
14351435

14361436
selected_cmd = self.commands[to_use["data"]["name"]]
14371437

1438+
if type(selected_cmd) == dict:
1439+
return # this is context dict storage.
1440+
14381441
if selected_cmd._type != 1:
14391442
return # If its a menu, ignore.
14401443

0 commit comments

Comments
 (0)