diff --git a/CHANGELOG.md b/CHANGELOG.md index fee4580268..157adbc5bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -222,6 +222,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2332](https://github.com/Pycord-Development/pycord/issues/2332)) - Fixed options declared using the 'default' syntax always being optional. ([#2333](https://github.com/Pycord-Development/pycord/issues/2333)) +- Fixed `BridgeContext` type hints raising an exception for unsupported option type. + ([#2337](https://github.com/Pycord-Development/pycord/pull/2337)) ## [2.4.1] - 2023-03-20 diff --git a/discord/enums.py b/discord/enums.py index f2bb6d3452..dd9aa1c16d 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -808,9 +808,10 @@ def from_datatype(cls, datatype): return cls.number from .commands.context import ApplicationContext + from .ext.bridge import BridgeContext if not issubclass( - datatype, ApplicationContext + datatype, (ApplicationContext, BridgeContext) ): # TODO: prevent ctx being passed here in cog commands raise TypeError( f"Invalid class {datatype} used as an input type for an Option"