Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format with black
  • Loading branch information
baptiste0928 committed Mar 21, 2023
commit 13437cd07ecf4de18a79248d43d08f333e4f6ac8
4 changes: 3 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def __init__(self):
self.plugin_db = PluginDatabaseClient(self) # Deprecated
self.startup()

def get_guild_icon(self, guild: typing.Optional[discord.Guild], *, size: typing.Optional[int] = None) -> str:
def get_guild_icon(
self, guild: typing.Optional[discord.Guild], *, size: typing.Optional[int] = None
) -> str:
if guild is None:
guild = self.guild
if guild.icon is None:
Expand Down
7 changes: 5 additions & 2 deletions cogs/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,9 @@ async def alias(self, ctx, *, name: str.lower = None):
for i, names in enumerate(zip_longest(*(iter(sorted(self.bot.aliases)),) * 15)):
description = utils.format_description(i, names)
embed = discord.Embed(color=self.bot.main_color, description=description)
embed.set_author(name="Command Aliases", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128))
embed.set_author(
name="Command Aliases", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128)
)
embeds.append(embed)

session = EmbedPaginatorSession(ctx, *embeds)
Expand Down Expand Up @@ -1612,7 +1614,8 @@ async def permissions_get(
)
embed = discord.Embed(color=self.bot.main_color, description=description)
embed.set_author(
name="Permission Overrides", icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128)
name="Permission Overrides",
icon_url=self.bot.get_guild_icon(guild=ctx.guild, size=128),
)
embeds.append(embed)

Expand Down
4 changes: 3 additions & 1 deletion core/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ async def send_recipient_genesis_message():
else:
footer = self.bot.config["thread_creation_footer"]

embed.set_footer(text=footer, icon_url=self.bot.get_guild_icon(guild=self.bot.modmail_guild, size=128))
embed.set_footer(
text=footer, icon_url=self.bot.get_guild_icon(guild=self.bot.modmail_guild, size=128)
)
embed.title = self.bot.config["thread_creation_title"]

if creator is None or creator == recipient:
Expand Down