feat: parse attachments from embed URLs
This commit is contained in:
parent
da5a4eddaa
commit
b4be9d8cd0
@ -2127,9 +2127,10 @@ CRITICAL: Do NOT output anything other than the required JSON response.
|
|||||||
if message.author.bot:
|
if message.author.bot:
|
||||||
print(f"Ignoring message {message.id} from bot.")
|
print(f"Ignoring message {message.id} from bot.")
|
||||||
return
|
return
|
||||||
|
embed_urls = [embed.url for embed in message.embeds if embed.url]
|
||||||
link_urls = (
|
link_urls = (
|
||||||
self.extract_direct_attachment_urls(message.content)
|
self.extract_direct_attachment_urls(" ".join(embed_urls))
|
||||||
if message.content
|
if embed_urls
|
||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
# Ignore messages without content, attachments, or direct attachment links
|
# Ignore messages without content, attachments, or direct attachment links
|
||||||
|
Loading…
x
Reference in New Issue
Block a user