Skip to content

Commit 37812b4

Browse files
committed
Removed unused code for now
1 parent dc77648 commit 37812b4

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

discord_slash/client.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class SlashCommand:
2424
"""
2525
def __init__(self,
2626
client: typing.Union[discord.Client, commands.Bot],
27-
auto_register: bool = False
28-
):
27+
auto_register: bool = False):
2928
if isinstance(client, discord.Client) and not isinstance(client, commands.Bot):
3029
raise Exception("Currently only commands.Bot is supported.")
3130
self._discord = client
@@ -92,16 +91,8 @@ async def _pick(ctx, choice1, choice2): # Command with 1 or more args.
9291
auto_convert[x["name"]] = x["type"]
9392

9493
def wrapper(cmd):
95-
self.commands[cmd.__name__ if not name else name] = [cmd, auto_convert]
94+
self.commands[cmd.__name__ if not name else name] = [cmd, auto_convert, description, guild_id, options]
9695
self.logger.debug(f"Added command `{cmd.__name__ if not name else name}`")
97-
"""
98-
if self.auto_register:
99-
manage_commands.add_slash_command(self._discord.user.id,
100-
self._discord.http.token,
101-
guild_id,
102-
cmd.__name__ if not name else name,
103-
description)
104-
"""
10596
return cmd
10697
return wrapper
10798

0 commit comments

Comments
 (0)