From b4be9d8cd02dff830e304243587e0317dece469f Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 7 Jun 2025 00:33:17 +0000 Subject: [PATCH] feat: parse attachments from embed URLs --- cogs/aimod_cog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogs/aimod_cog.py b/cogs/aimod_cog.py index b66a40b..66492b3 100644 --- a/cogs/aimod_cog.py +++ b/cogs/aimod_cog.py @@ -2127,9 +2127,10 @@ CRITICAL: Do NOT output anything other than the required JSON response. if message.author.bot: print(f"Ignoring message {message.id} from bot.") return + embed_urls = [embed.url for embed in message.embeds if embed.url] link_urls = ( - self.extract_direct_attachment_urls(message.content) - if message.content + self.extract_direct_attachment_urls(" ".join(embed_urls)) + if embed_urls else [] ) # Ignore messages without content, attachments, or direct attachment links