Fix the Context.message example to actually use ctx.message

This commit is contained in:
Chris Rrapi 2019-01-09 07:36:43 -05:00 committed by Rapptz
parent ce3ede1551
commit df6bdb3007

View File

@ -276,9 +276,8 @@ message.
Example: :: Example: ::
@bot.command() @bot.command()
async def joined_at(ctx, member: discord.Member = None): async def length(ctx):
member = member or ctx.author await ctx.send('Your message is {} characters long.'.format(len(ctx.message.content)))
await ctx.send('{0} joined at {0.joined_at}'.format(member))
How do I make a subcommand? How do I make a subcommand?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~