Skip to content

Commit 69f125d

Browse files
committed
Fixed error when guild_ids is not passed to decorator
1 parent a5caf92 commit 69f125d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

discord_slash/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ def add_slash_command(self,
344344
"""
345345
name = name or cmd.__name__
346346
name = name.lower()
347+
guild_ids = guild_ids if guild_ids else []
347348
if name in self.commands:
348349
tgt = self.commands[name]
349350
if not tgt.has_subcommands:
@@ -411,6 +412,7 @@ def add_subcommand(self,
411412
name = name or cmd.__name__
412413
name = name.lower()
413414
description = description or getdoc(cmd)
415+
guild_ids = guild_ids if guild_ids else []
414416

415417
if base in self.commands:
416418
for x in guild_ids:

0 commit comments

Comments
 (0)