chore: auto-commit from dashboard

This commit is contained in:
2026-06-09 09:13:35 +00:00
parent 55a175f78e
commit a8d024944d
11 changed files with 581 additions and 22 deletions

View File

@@ -1171,6 +1171,16 @@ def create_bot(config: Config) -> discord.Client:
user_id = str(message.author.id)
text = message.content
# Download attachments to /tmp and append paths to text
for attachment in message.attachments:
tmp_path = f"/tmp/{attachment.filename}"
try:
await attachment.save(tmp_path)
text = (text + f"\n[ATTACHMENT:{tmp_path}]").strip()
logger.info("Saved attachment: %s (%d bytes)", tmp_path, attachment.size)
except Exception:
logger.exception("Failed to save attachment: %s", attachment.filename)
# React to acknowledge receipt
await message.add_reaction("\U0001f440")