Skip to content

Commit c84d301

Browse files
committed
Fix error when guild id is None.
1 parent a7f468b commit c84d301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord_slash/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def add_slash_command(
535535
"""
536536
name = name or cmd.__name__
537537
name = name.lower()
538-
if not all(isinstance(item, int) for item in guild_ids):
538+
if guild_ids and not all(isinstance(item, int) for item in guild_ids):
539539
raise error.IncorrectGuildIDType(
540540
f"The snowflake IDs {guild_ids} given are not a list of integers. Because of discord.py convention, please use integer IDs instead. Furthermore, the command '{name}' will be deactivated and broken until fixed."
541541
)

0 commit comments

Comments
 (0)