Repository: Pycord-Development/pycord

Issue:
Issubclass Error with BridgeCommands.
### Summary

Issubclass Error Occurs when Option's choice is set to Boolean.

### Reproduction Steps

Just used the options decorator with its choice set to boolean. I transfered from Slash_commands and to Bridge_commands, and the bug started showing up, but not for other ones. 

This is the MOST important part: Although the slash_commands work FINE, but the prefix_commands does NOT.

### Minimal Reproducible Code

```python
@bridge_command.command("test", "this is a test")
@option("boolean", "choose True or False")
async def test_command(ctx, boolean):
    ctx.respond(boolean)
```


### Expected Results

Whatever the result was with that Boolean.
If the choice was True, return True, and vice-versa.

### Actual Results

Throw an error on to on_command_error.

Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/converter.py", line 1147, in _actual_conversion
    return await converter.convert(ctx, argument)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/bridge/core.py", line 543, in convert
    if issubclass(converter, Converter):
  File "/usr/lib/python3.8/abc.py", line 102, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/client.py", line 378, in _run_event
    await coro(*args, **kwargs)
  File "/home/ubuntu/Yomasete_Iruka_V3/ruka.py", line 327, in on_command_error
    raise error
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 347, in invoke
    await ctx.command.invoke(ctx)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1545, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 942, in invoke
    await self.prepare(ctx)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 872, in prepare
    await self._parse_arguments(ctx)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 774, in _parse_arguments
    transformed = await self.transform(ctx, param)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/bridge/core.py", line 94, in transform
    return await super().transform(ctx, param)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 618, in transform
    return await run_converters(ctx, converter, argument, param)  # type: ignore
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/converter.py", line 1255, in run_converters
    return await _actual_conversion(ctx, converter, argument, param)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/discord/ext/commands/converter.py", line 1151, in _actual_conversion
    raise ConversionError(converter, exc) from exc
discord.ext.commands.errors.ConversionError: (<discord.commands.BridgeOption name=boolean>, TypeError('issubclass() arg 1 must be a class'))

### Intents

messages=True, message_content=True, guilds=True, members=True, voice_states=True, guild_reactions=True

### System Information

- Python v3.8.10-final
- py-cord v2.4.None-final
- aiohttp v3.8.1
- system info: Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

I maybe not sure, but the similar problem happened with AutoCompleteConetext too.
I did not throughly check it so don't take it seriously, but that also does not work too with prefix_commands.


Discussion:

Resolving patch:
diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py
--- a/discord/ext/bridge/core.py
+++ b/discord/ext/bridge/core.py
@@ -532,10 +532,15 @@ async def convert(self, ctx: Context, arg: str):
             return attach
 
 
+class BooleanConverter(Converter):
+    async def convert(self, ctx, arg: bool):
+        return _convert_to_bool(str(arg))
+
+
 BRIDGE_CONVERTER_MAPPING = {
     SlashCommandOptionType.string: str,
     SlashCommandOptionType.integer: int,
-    SlashCommandOptionType.boolean: lambda val: _convert_to_bool(str(val)),
+    SlashCommandOptionType.boolean: BooleanConverter,
     SlashCommandOptionType.user: UserConverter,
     SlashCommandOptionType.channel: GuildChannelConverter,
     SlashCommandOptionType.role: RoleConverter,
@@ -579,3 +584,4 @@ async def convert(self, ctx, argument: str) -> Any:
 
 
 discord.commands.options.Option = BridgeOption
+discord.Option = BridgeOption


Test patch: