aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Rrapi <[email protected]>2019-01-09 07:36:43 -0500
committerRapptz <[email protected]>2019-01-28 22:22:49 -0500
commitdf6bdb3007694e1476a31e5ba2cd5d511fe2017b (patch)
tree61e5c93852414711c78c33dc002772d6c84f0db7 /docs
parentImplement PartialEmoji == Emoji (fixes #1627) (diff)
downloaddiscord.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.rst5
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?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~