fix(aurora): fixed error if you attempt to moderate someone and your guild has the default icon
Some checks failed
Pylint / Pylint (3.11) (push) Failing after 2m58s

This commit is contained in:
Seaswimmer 2023-12-29 00:50:03 -05:00
parent 3e4d3e3e28
commit b5a971831a
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -52,7 +52,10 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
embed = Embed(title=str.title(moderation_type), description=f"You have {embed_desc} {moderation_type}{embed_duration} in {guild_name}.", color=color, timestamp=datetime.now())
embed.add_field(name='Reason', value=f"`{reason}`")
if guild.icon.url is not None:
embed.set_author(name=guild.name, icon_url=guild.icon.url)
else:
embed.set_author(name=guild.name)
embed.set_footer(text=f"Case #{await get_next_case_number(guild.id):,}", icon_url="https://cdn.discordapp.com/attachments/1070822161389994054/1159469476773904414/arrow-right-circle-icon-512x512-2p1e2aaw.png?ex=65312319&is=651eae19&hm=3cebdd28e805c13a79ec48ef87c32ca532ffa6b9ede2e48d0cf8e5e81f3a6818&")
return embed