Skip to content

Commit

Permalink
Merge pull request #35 from Honkertonken/sourcery/master
Browse files Browse the repository at this point in the history
Sourcery refactored master branch
  • Loading branch information
Honkertonken committed Sep 28, 2022
2 parents 8de4a44 + 2ce2caf commit 85d10dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pp/pp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def randompp(self, ctx, toggle: bool):
is ran.
"""
await self.config.random.set(random)
await ctx.send("Random pp length is now {}.".format("enabled" if random else "disabled"))
await ctx.send(f'Random pp length is now {"enabled" if random else "disabled"}.')

@commands.command()
async def pp(self, ctx, *users: discord.Member):
Expand Down Expand Up @@ -58,9 +58,7 @@ async def pp(self, ctx, *users: discord.Member):

lengths = sorted(lengths.items(), key=lambda x: x[1])

msg = "".join(
"**{}'s size:**\n{}\n".format(user.display_name, length) for user, length in lengths
)
msg = "".join(f"**{user.display_name}'s size:**\n{length}\n" for user, length in lengths)

for page in pagify(msg):
await ctx.send(page)

0 comments on commit 85d10dc

Please sign in to comment.