Skip to content

Commit

Permalink
Fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sebkuip committed May 23, 2024
1 parent 16a4ecc commit 6833fa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ async def snippet(self, ctx, *, name: str.lower = None):
for i, names in enumerate(zip_longest(*(iter(sorted(self.bot.snippets)),) * 15)):
description = format_description(i, names)
embed = discord.Embed(color=self.bot.main_color, description=description)
embed.set_author(name="Snippets", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128))
embed.set_author(
name="Snippets", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128)
)
embeds.append(embed)

session = EmbedPaginatorSession(ctx, *embeds)
Expand Down Expand Up @@ -180,7 +182,9 @@ async def snippet(self, ctx, *, name: str.lower = None):
embed.set_author(name="Snippets", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128))

for i, snippet in enumerate(sorted(self.bot.snippets.items())):
embeds[i//10].add_field(name=snippet[0], value=return_or_truncate(snippet[1], 350), inline=False)
embeds[i // 10].add_field(
name=snippet[0], value=return_or_truncate(snippet[1], 350), inline=False
)

session = EmbedPaginatorSession(ctx, *embeds)
await session.run()
Expand Down
1 change: 1 addition & 0 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ def return_or_truncate(text, max_length):
return text
return text[: max_length - 3] + "..."


class AcceptButton(discord.ui.Button):
def __init__(self, emoji):
super().__init__(style=discord.ButtonStyle.gray, emoji=emoji)
Expand Down

0 comments on commit 6833fa1

Please sign in to comment.