diff --git a/bot/extensions/custom_roles/events.py b/bot/extensions/custom_roles/events.py index aaad6302..273c3fcc 100644 --- a/bot/extensions/custom_roles/events.py +++ b/bot/extensions/custom_roles/events.py @@ -69,12 +69,17 @@ async def on_custom_role_update(self, before: CustomRole, after: CustomRole): timestamp=datetime.datetime.utcnow(), ) - embed.add_field(name="Old Name", value=before.name) - embed.add_field(name="New Name", value=after.name) + if before.name != after.name: + embed.add_field(name="Name (Updated)", value=f"{before.name} -> {after.name}") + else: + embed.add_field(name="Name", value=before.name) embed.add_field(name="\u200B", value="\u200B") - embed.add_field(name="Old Color", value="#" + hex(before.color)[2:]) - embed.add_field(name="New Color", value="#" + hex(after.color)[2:]) + if before.color != after.color: + embed.add_field(name="Color (Updated)", value=f"#{hex(before.color)[2:]} -> #{hex(after.color)[2:]}") + else: + embed.add_field(name="Color", value="#" + hex(after.color)[2:]) embed.set_thumbnail(url=user.avatar) + embed.set_author(name=user.name, icon_url=user.avatar) embed.set_footer(text=f"user_id: {after.user_id}") return await self.custom_roles_logs_channel.send(embed=embed)