Summary
The bot can already read files attached to user messages ( collects attachment URLs and injects them into the prompt). However the bot currently has no way to send files as Discord attachments in its own messages.
Motivation
Useful when the agent produces output that is best consumed as a file (logs, generated code, data exports, images, etc.). Pasting large blobs inline degrades readability.
Proposed changes
1. LiveMessagePayload — add optional file support
interface LiveMessagePayload {
content?: string;
embeds?: EmbedBuilder[];
files?: (AttachmentBuilder | string)[]; // new
}
2. LiveDiscordRunRenderer — expose attachFile(path)
Queue a local file path (or AttachmentBuilder) for the next flush.
3. Message targets — forward files on send/edit
createChannelLiveMessageTarget and createInteractionLiveMessageTarget should include files in the payload when calling send / edit.
4. Tool exposure
Provide a built-in or skill-level tool so the agent can call something like:
attachFile({ path: '/tmp/result.csv', filename: 'result.csv' })
…and it will be delivered with the next bot reply.
Notes
- Discord does not support editing a message to add attachments after the fact; files must be included on the initial send or a follow-up message.
- File size limit: 8 MB (25 MB with Nitro / boosted server).
- Related code:
src/core/live-discord-renderer.ts, src/discord/message-helpers.ts
Summary
The bot can already read files attached to user messages ( collects attachment URLs and injects them into the prompt). However the bot currently has no way to send files as Discord attachments in its own messages.
Motivation
Useful when the agent produces output that is best consumed as a file (logs, generated code, data exports, images, etc.). Pasting large blobs inline degrades readability.
Proposed changes
1.
LiveMessagePayload— add optional file support2.
LiveDiscordRunRenderer— exposeattachFile(path)Queue a local file path (or
AttachmentBuilder) for the next flush.3. Message targets — forward files on send/edit
createChannelLiveMessageTargetandcreateInteractionLiveMessageTargetshould includefilesin the payload when callingsend/edit.4. Tool exposure
Provide a built-in or skill-level tool so the agent can call something like:
…and it will be delivered with the next bot reply.
Notes
src/core/live-discord-renderer.ts,src/discord/message-helpers.ts