Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def ignore(ctx: commands.Context, target: typing.Union[discord.Member, dis
# The `commands` framework attempts a conversion of each type in this Union *in order*.
# So, it will attempt to convert whatever is passed to `target` to a `discord.Member` instance.
# If that fails, it will attempt to convert it to a `discord.TextChannel` instance.
# See: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#typing-union
# See: https://pycord.readthedocs.io/en/latest/ext/commands/commands.html#typing-union
# NOTE: If a Union typehint converter fails it will raise `commands.BadUnionArgument`
# instead of `commands.BadArgument`.

Expand All @@ -104,7 +104,7 @@ async def ignore(ctx: commands.Context, target: typing.Union[discord.Member, dis
async def multiply(ctx: commands.Context, number: int, maybe: bool):
# We want an `int` and a `bool` parameter here.
# `bool` is a slightly special case, as shown here:
# See: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#bool
# See: https://pycord.readthedocs.io/en/latest/ext/commands/commands.html#bool

if maybe is True:
return await ctx.send(number * 2)
Expand Down