From f719cbce5a93ba67c56754386e67caf44d96b3bb Mon Sep 17 00:00:00 2001 From: Middledot Date: Sun, 29 Oct 2023 04:16:17 -0400 Subject: [PATCH] chore(bridge): force BridgeOption --- discord/ext/bridge/core.py | 6 ++---- docs/ext/bridge/api.rst | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index 427bd0269f..02a545c053 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -591,6 +591,8 @@ async def convert(self, ctx, arg: bool): class BridgeOption(Option, Converter): + """Slash command option for bridge commands. Otherwise equivalent in every way to :class:`discord.Option`.""" + async def convert(self, ctx, argument: str) -> Any: try: if self.converter is not None: @@ -621,7 +623,3 @@ async def convert(self, ctx, argument: str) -> Any: return converted except ValueError as exc: raise BadArgument() from exc - - -discord.commands.options.Option = BridgeOption -discord.Option = BridgeOption diff --git a/docs/ext/bridge/api.rst b/docs/ext/bridge/api.rst index d8f4d78821..321d04dd71 100644 --- a/docs/ext/bridge/api.rst +++ b/docs/ext/bridge/api.rst @@ -157,3 +157,9 @@ BridgeContext Subclasses .. data:: discord.ext.bridge.Context Alias of :data:`typing.Union` [ :class:`.BridgeExtContext`, :class:`.BridgeApplicationContext` ] for typing convenience. + +Option +------ + +BridgeOption +~~~~~~~~~~~~