mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
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:
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user