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/new_member.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/new_member.py')
| -rw-r--r-- | examples/new_member.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/new_member.py b/examples/new_member.py index aa67c46e..6a9a530f 100644 --- a/examples/new_member.py +++ b/examples/new_member.py @@ -12,7 +12,7 @@ class MyClient(discord.Client): async def on_member_join(self, member): guild = member.guild if guild.system_channel is not None: - to_send = 'Welcome {0.mention} to {1.name}!'.format(member, guild) + to_send = f'Welcome {member.mention} to {guild.name}!' await guild.system_channel.send(to_send) |