diff options
| author | Chris Rrapi <[email protected]> | 2019-01-09 07:36:43 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-01-28 22:22:49 -0500 |
| commit | df6bdb3007694e1476a31e5ba2cd5d511fe2017b (patch) | |
| tree | 61e5c93852414711c78c33dc002772d6c84f0db7 /docs | |
| parent | Implement PartialEmoji == Emoji (fixes #1627) (diff) | |
| download | discord.py-df6bdb3007694e1476a31e5ba2cd5d511fe2017b.tar.xz discord.py-df6bdb3007694e1476a31e5ba2cd5d511fe2017b.zip | |
Fix the Context.message example to actually use ctx.message
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/faq.rst | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/faq.rst b/docs/faq.rst index c55e5a8f..3dbfc4c8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -276,9 +276,8 @@ message. Example: :: @bot.command() - async def joined_at(ctx, member: discord.Member = None): - member = member or ctx.author - await ctx.send('{0} joined at {0.joined_at}'.format(member)) + async def length(ctx): + await ctx.send('Your message is {} characters long.'.format(len(ctx.message.content))) How do I make a subcommand? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |