Skip to content

Commit 36950f6

Browse files
committed
Fixed command can be called as subcommand even if has coro
1 parent 42f9081 commit 36950f6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
__pycache__
33
test.py
44
test2.py
5+
test3.py
56
docs/_build
6-
slash.log
7+
slash.log
8+
test

discord_slash/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ async def on_socket_response(self, msg):
499499
if guild_id not in selected_cmd.allowed_guild_ids:
500500
return
501501

502-
if selected_cmd.has_subcommands:
502+
if selected_cmd.has_subcommands and not selected_cmd.func:
503503
return await self.handle_subcommand(ctx, to_use)
504504

505505
args = await self.process_options(ctx.guild, to_use["data"]["options"], selected_cmd.auto_convert) \

0 commit comments

Comments
 (0)