From d319539edb214202b090b01d641c00f0c9d487c3 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 9 May 2022 18:15:31 -0400 Subject: [PATCH] [commands] Fix broken examples in commands.param documentation --- docs/ext/commands/commands.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ext/commands/commands.rst b/docs/ext/commands/commands.rst index dcd06b6fd..b6d24d890 100644 --- a/docs/ext/commands/commands.rst +++ b/docs/ext/commands/commands.rst @@ -913,7 +913,7 @@ This is useful for: .. code-block:: python3 @bot.command() - async def wave(to: discord.User = commands.parameter(default=lambda ctx: ctx.author)): + async def wave(ctx, to: discord.User = commands.parameter(default=lambda ctx: ctx.author)): await ctx.send(f'Hello {to.mention} :wave:') Because this is such a common use-case, the library provides :obj:`~.ext.commands.Author`, :obj:`~.ext.commands.CurrentChannel` and @@ -922,7 +922,7 @@ This is useful for: .. code-block:: python3 @bot.command() - async def wave(to: discord.User = commands.Author): + async def wave(ctx, to: discord.User = commands.Author): await ctx.send(f'Hello {to.mention} :wave:') :obj:`~.ext.commands.Author` and co also have other benefits like having the displayed default being filled.