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`.
This commit is contained in:
Rapptz
2021-04-04 07:03:53 -04:00
parent 9fc2ab9c99
commit 9d39b135f4
67 changed files with 262 additions and 378 deletions
+1 -1
View File
@@ -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)