From ff8f79452494df43050ebaa7b039f2cc9f4530da Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Fri, 23 Oct 2026 21:41:21 +0200 Subject: [PATCH] show a warning in /guild ikon when the server has no icon Co-Authored-By: Claude Opus 5.5 --- bot/src/cogs/info.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/src/cogs/info.py b/bot/src/cogs/info.py index edb97a3..b23d234 100644 --- a/bot/src/cogs/info.py +++ b/bot/src/cogs/info.py @@ -304,6 +304,10 @@ class Info(commands.Cog): interaction (discord.Interaction): Slash command context object """ + if not interaction.guild.icon: + embed = embed_templates.error_warning("Serveren har ikke et ikon") + return await interaction.response.send_message(embed=embed) + embed = discord.Embed(color=interaction.guild.me.color, description=f"[Lenke]({interaction.guild.icon})") embed.set_author(name=interaction.guild.name, icon_url=interaction.guild.icon) embed.set_image(url=interaction.guild.icon)