mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
[commands] Add overload to run_converters
This commit is contained in:
parent
18a6881fd9
commit
9fcb3c8871
@ -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|
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user