feat: parse attachments from embed URLs

This commit is contained in:
Codex 2025-06-07 00:33:17 +00:00 committed by Slipstream
parent da5a4eddaa
commit b4be9d8cd0
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -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