Repository: interactions-py/interactions.py

Issue:
Traceback from library on basic function
Traceback on Version 2.0.1. On 1.1.0 working as expected.
python 3.8.5

### Traceback
```
Traceback (most recent call last):
  File "bot.py", line 28, in <module>
    async def purge(ctx, number_of_messages : int):
  File "/home/solumath/.local/lib/python3.8/site-packages/discord_slash/client.py", line 760, in wrapper
    obj = self.add_slash_command(
  File "/home/solumath/.local/lib/python3.8/site-packages/discord_slash/client.py", line 538, in add_slash_command
    if not all(isinstance(item, int) for item in guild_ids):
TypeError: 'NoneType' object is not iterable
```

### Code
```py
@slash.slash(name="purge", description="delete number of messages")
@commands.has_permissions(manage_messages=True)
async def purge(ctx, number_of_messages : int):
    await ctx.channel.purge(limit=number_of_messages)
    await ctx.send("What is real? How do you define real?", delete_after=5)
```
Probably in library as discussed on discord server.


Discussion:

Resolving patch:
diff --git a/discord_slash/client.py b/discord_slash/client.py
--- a/discord_slash/client.py
+++ b/discord_slash/client.py
@@ -535,6 +535,7 @@ def add_slash_command(
         """
         name = name or cmd.__name__
         name = name.lower()
+        guild_ids = guild_ids if guild_ids else []
         if not all(isinstance(item, int) for item in guild_ids):
             raise error.IncorrectGuildIDType(
                 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."
@@ -616,7 +617,8 @@ def add_subcommand(
         name = name or cmd.__name__
         name = name.lower()
         description = description or getdoc(cmd)
-        if guild_ids and not all(isinstance(item, int) for item in guild_ids):
+        guild_ids = guild_ids if guild_ids else []
+        if not all(isinstance(item, int) for item in guild_ids):
             raise error.IncorrectGuildIDType(
                 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."
             )
diff --git a/discord_slash/cog_ext.py b/discord_slash/cog_ext.py
--- a/discord_slash/cog_ext.py
+++ b/discord_slash/cog_ext.py
@@ -58,11 +58,10 @@ def wrapper(cmd):
         else:
             opts = options
 
-        if guild_ids is not None:
-            if not all(isinstance(item, int) for item in guild_ids):
-                raise IncorrectGuildIDType(
-                    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 or cmd.__name__}' will be deactivated and broken until fixed."
-                )
+        if guild_ids and not all(isinstance(item, int) for item in guild_ids):
+            raise IncorrectGuildIDType(
+                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 or cmd.__name__}' will be deactivated and broken until fixed."
+            )
 
         _cmd = {
             "func": cmd,
@@ -147,11 +146,10 @@ def wrapper(cmd):
         else:
             opts = options
 
-        if guild_ids is not None:
-            if not all(isinstance(item, int) for item in guild_ids):
-                raise IncorrectGuildIDType(
-                    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 or cmd.__name__}' will be deactivated and broken until fixed."
-                )
+        if guild_ids and not all(isinstance(item, int) for item in guild_ids):
+            raise IncorrectGuildIDType(
+                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 or cmd.__name__}' will be deactivated and broken until fixed."
+            )
 
         _cmd = {
             "func": None,


Test patch: