diff options
Diffstat (limited to 'docs/faq.rst')
| -rw-r--r-- | docs/faq.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/faq.rst b/docs/faq.rst index 643fc385..f7c7e727 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -388,7 +388,7 @@ Example: :: @bot.command() async def length(ctx): - await ctx.send('Your message is {} characters long.'.format(len(ctx.message.content))) + await ctx.send(f'Your message is {len(ctx.message.content)} characters long.') How do I make a subcommand? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -405,6 +405,6 @@ Example: :: @git.command() async def push(ctx, remote: str, branch: str): - await ctx.send('Pushing to {} {}'.format(remote, branch)) + await ctx.send(f'Pushing to {remote} {branch}') This could then be used as ``?git push origin master``. |