Skip to content

Commit fae5da3

Browse files
committed
Fixed guild_ids and has_subcommands can be falsely overrided
1 parent 4f38d7a commit fae5da3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

discord_slash/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def add_slash_command(self,
104104
"""
105105
name = cmd.__name__ if not name else name
106106
name = name.lower()
107+
if name in self.commands.keys():
108+
tgt = self.subcommands[name]
109+
has_subcommands = tgt["has_subcommands"]
110+
guild_ids += tgt["guild_ids"]
107111
_cmd = {
108112
"func": cmd,
109113
"description": description if description else "No description.",

0 commit comments

Comments
 (0)