From b5a971831a6c24286d95598e30bd55e38bba2999 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 29 Dec 2023 00:50:03 -0500 Subject: [PATCH] fix(aurora): fixed error if you attempt to moderate someone and your guild has the default icon --- aurora/utilities/embed_factory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aurora/utilities/embed_factory.py b/aurora/utilities/embed_factory.py index b22d57a..6a0c3ea 100644 --- a/aurora/utilities/embed_factory.py +++ b/aurora/utilities/embed_factory.py @@ -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}`") - embed.set_author(name=guild.name, icon_url=guild.icon.url) + 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