Use f-strings in more places that were missed

This commit is contained in:
Sebastian Law authored and GitHub committed 2021-04-08 09:31:06 -04:00
1 parent 99fc950510
commit 05c123f3ab
7 files changed
+19 -18

No files matched your search

+3 -3
View File
@@ -33,16 +33,16 @@ This example cog defines a ``Greetings`` category for your commands, with a sing
async def on_member_join(self, member):
channel = member.guild.system_channel
if channel is not None:
await channel.send('Welcome {0.mention}.'.format(member))
await channel.send(f'Welcome {member.mention}.')
@commands.command()
async def hello(self, ctx, *, member: discord.Member = None):
"""Says hello"""
member = member or ctx.author
if self._last_member is None or self._last_member.id != member.id:
await ctx.send('Hello {0.name}~'.format(member))
await ctx.send(f'Hello {member.name}~')
else:
await ctx.send('Hello {0.name}... This feels familiar.'.format(member))
await ctx.send(f'Hello {member.name}... This feels familiar.')
self._last_member = member
A couple of technical notes to take into consideration: