diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 4d7d8622d..45dfea104 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -35,6 +35,7 @@ from typing import ( List, Literal, Optional, + overload, Protocol, Tuple, Type, @@ -1242,6 +1243,18 @@ async def _actual_conversion(ctx: Context[BotT], converter, argument: str, param raise BadArgument(f'Converting to "{name}" failed for parameter "{param.name}".') from exc +@overload +async def run_converters( + ctx: Context[BotT], converter: Union[Type[Converter[T]], Converter[T]], argument: str, param: Parameter +) -> T: + ... + + +@overload +async def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any: + ... + + async def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any: """|coro|