diff options
| author | Rapptz <[email protected]> | 2021-04-04 04:40:19 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-04 07:03:53 -0400 |
| commit | 9d39b135f4f84239787b0901d06a4f370a82d4bb (patch) | |
| tree | 8826845cfd47eafa5c9d2ef1fcbedd36382714f4 /examples/basic_bot.py | |
| parent | Bump minimum Python version to 3.8 (diff) | |
| download | discord.py-9d39b135f4f84239787b0901d06a4f370a82d4bb.tar.xz discord.py-9d39b135f4f84239787b0901d06a4f370a82d4bb.zip | |
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
Diffstat (limited to 'examples/basic_bot.py')
| -rw-r--r-- | examples/basic_bot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/basic_bot.py b/examples/basic_bot.py index 409d4c4a..1d8928bf 100644 --- a/examples/basic_bot.py +++ b/examples/basic_bot.py @@ -61,7 +61,7 @@ async def cool(ctx): In reality this just checks if a subcommand is being invoked. """ if ctx.invoked_subcommand is None: - await ctx.send('No, {0.subcommand_passed} is not cool'.format(ctx)) + await ctx.send(f'No, {ctx.subcommand_passed} is not cool') @cool.command(name='bot') async def _bot(ctx): |