Add bots files handling logic

This commit is contained in:
2026-10-21 17:56:09 +01:00
parent b0af4db1bf
commit d17a4a7bdd
97 changed files with 5843 additions and 41 deletions
@@ -26,6 +26,10 @@ type Params = {
* Finish without posting a message.
*/
silent?: boolean;
/**
* Files the bot saved and asked to send with it (`media` ids).
*/
attachments?: number[];
};
/**
@@ -43,6 +47,7 @@ export default async function completeBotJob({
result,
needs_you,
silent,
attachments,
}: Params) {
const job = await grabLockedBotJob({ job_id, worker });
@@ -81,6 +86,7 @@ export default async function completeBotJob({
workspace_id: job.workspace_id || null,
text: result,
needs_you,
media_ids: attachments,
});
const user_id = await grabJobUserId({ job });