Repository: interactions-py/interactions.py

Issue:
[BUG] Error starting when using scope param in command decorator  
### Describe the bug.

When starting the bot with a command that has a scope as a param specified it results in a KeyError:
```py
Could not prepare the client:
Traceback (most recent call last):
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 404, in _ready
    await self.__sync()
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 621, in __sync
    if _guild_command["name"] not in __check_guild_commands[_guild_id]:
KeyError: None
```

### List the steps.

1. Create a bot: 
```py
ids = 8210301307------
bot = interactions.Client(token="", default_scope=ids)
```
2. Create a command with a scope param:
```py
@bot.command(
    name="test",
    description="test",
    scope=ids
)
async def _test(ctx):
    await ctx.send("test")

```
3. run the bot
4. see Traceback

### What you expected.

The command should be correctly registered for the guilds provided in the default_scope and command scope

File client/bot.py, line 517, in __resolve_commands:
```py
if cmd.default_scope and self._default_scope:
    cmd.scope = (
        cmd.scope.extend(self._default_scope)
        if isinstance(cmd.scope, list)
        else self._default_scope
    )
```

``cmd.scope.extend(self._default_scope)``
extends the cmd.scope, but then sets cmd.scope to its return value, which is None.
This overrides the scope, resulting in None being passed as the scope to command in full_data.
This passes None as the guild_id to the ApplicationCommand, which is used in when getting a guild_commands  _guild_id
=>  KeyError here ``if _guild_command["name"] not in __check_guild_commands[_guild_id]:``

replace 
```py
if cmd.default_scope and self._default_scope:
  cmd.scope = (
      cmd.scope.extend(self._default_scope)
      if isinstance(cmd.scope, list)
      else self._default_scope
  )
```
with 
```py
if cmd.default_scope and self._default_scope:
  if isinstance(cmd.scope, list):
    cmd.scope.extend(self._default_scope)
  else:
    cmd.scope = self._default_scope
```

### What you saw.

Instead, I received this traceback error given from my Python terminal:
```py
Could not prepare the client:
Traceback (most recent call last):
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 404, in _ready
    await self.__sync()
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 621, in __sync
    if _guild_command["name"] not in __check_guild_commands[_guild_id]:
KeyError: None
```

### What version of the library did you use?

stable

### Version specification

4.3.4

### Code of Conduct

- [X] I agree to follow the contribution requirements.
[BUG] Error starting when using scope param in command decorator  
### Describe the bug.

When starting the bot with a command that has a scope as a param specified it results in a KeyError:
```py
Could not prepare the client:
Traceback (most recent call last):
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 404, in _ready
    await self.__sync()
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 621, in __sync
    if _guild_command["name"] not in __check_guild_commands[_guild_id]:
KeyError: None
```

### List the steps.

1. Create a bot: 
```py
ids = 8210301307------
bot = interactions.Client(token="", default_scope=ids)
```
2. Create a command with a scope param:
```py
@bot.command(
    name="test",
    description="test",
    scope=ids
)
async def _test(ctx):
    await ctx.send("test")

```
3. run the bot
4. see Traceback

### What you expected.

The command should be correctly registered for the guilds provided in the default_scope and command scope

File client/bot.py, line 517, in __resolve_commands:
```py
if cmd.default_scope and self._default_scope:
    cmd.scope = (
        cmd.scope.extend(self._default_scope)
        if isinstance(cmd.scope, list)
        else self._default_scope
    )
```

``cmd.scope.extend(self._default_scope)``
extends the cmd.scope, but then sets cmd.scope to its return value, which is None.
This overrides the scope, resulting in None being passed as the scope to command in full_data.
This passes None as the guild_id to the ApplicationCommand, which is used in when getting a guild_commands  _guild_id
=>  KeyError here ``if _guild_command["name"] not in __check_guild_commands[_guild_id]:``

replace 
```py
if cmd.default_scope and self._default_scope:
  cmd.scope = (
      cmd.scope.extend(self._default_scope)
      if isinstance(cmd.scope, list)
      else self._default_scope
  )
```
with 
```py
if cmd.default_scope and self._default_scope:
  if isinstance(cmd.scope, list):
    cmd.scope.extend(self._default_scope)
  else:
    cmd.scope = self._default_scope
```

### What you saw.

Instead, I received this traceback error given from my Python terminal:
```py
Could not prepare the client:
Traceback (most recent call last):
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 404, in _ready
    await self.__sync()
  File "----/venv/lib/python3.10/site-packages/interactions/client/bot.py", line 621, in __sync
    if _guild_command["name"] not in __check_guild_commands[_guild_id]:
KeyError: None
```

### What version of the library did you use?

stable

### Version specification

4.3.4

### Code of Conduct

- [X] I agree to follow the contribution requirements.


Discussion:

Resolving patch:
diff --git a/interactions/client/bot.py b/interactions/client/bot.py
--- a/interactions/client/bot.py
+++ b/interactions/client/bot.py
@@ -593,11 +593,10 @@ def __resolve_commands(self) -> None:  # sourcery skip: low-code-quality
             cmd.listener = self._websocket._dispatch
 
             if cmd.default_scope and self._default_scope:
-                cmd.scope = (
+                if isinstance(cmd.scope, list):
                     cmd.scope.extend(self._default_scope)
-                    if isinstance(cmd.scope, list)
-                    else self._default_scope
-                )
+                else:
+                    cmd.scope = self._default_scope
 
             data: Union[dict, List[dict]] = cmd.full_data
             coro = cmd.dispatcher


Test patch: