Discord Bot
A configurable, bidirectional Discord I/O source that routes messages, attachments, and optional reaction events into a pipeline and can post pipeline answers back to Discord.
What it does
A source node (discord://) that authenticates with a bot you create in the Discord Developer Portal and listens for messages over the Discord Gateway. Text is routed to the text lane; image, audio, video, and document attachments are each downloaded (up to a configurable size limit) and routed to the matching lane by MIME type. The pipeline's first non-empty answer is sent back to the originating channel — as a reply, a channel message, or in a thread. Mentions are suppressed by default; explicit user and role allowlists can selectively enable them, while @everyone and @here always remain disabled. Every emitted object carries Discord message metadata and a correlation ID so downstream branches can store, evaluate, or merge related content without bot-specific logic.
The node uses discord.py to maintain a resilient Gateway connection with automatic heartbeating, resume, and reconnect. Attachments are downloaded through discord.py's Attachment.read() (which uses aiohttp transitively; it is not a direct dependency).
Connections
| Connection | Required | Description |
|---|---|---|
tool | no | The database node that Capture Events To Database writes to, connected through the control-plane invoke channel. Connect a database node that exists only for this source (see Capture Events To Database). |
Lanes
The node is a pipeline source: its _source lane emits one object per message and per attachment, routed by type.
| Lane in | Lane out | Description |
|---|---|---|
_source | text | Message text and configured text-like attachments, written as plain text. |
_source | image | Image attachments, downloaded and routed with MIME type (e.g. image/png). |
_source | audio | Audio attachments, downloaded with MIME type (e.g. audio/mpeg). |
_source | video | Video attachments, downloaded with MIME type (e.g. video/mp4). |
_source | tags | Documents (PDF, Word, archive, and so on), downloaded as tagged stream data; connect a Parser node downstream. Also carries one JSON event object per reaction, no_reply, or outbound event while the matching emitReactions, emitNoReply, or emitOutbound setting is on, so a Parser on tags sees those events too. |
Entry URLs are discord://<channel_id>/<message_id> for text, discord://<channel_id>/<message_id>/<attachment_id> for attachments, and discord://<channel_id>/<message_id>/<event_type> for events. Text objects are named with the message ID; attachment objects use <message_id>:<index> and events <message_id>:<event_type>. Metadata includes message/channel/thread/guild/author IDs, mentions, reply reference, attachment summaries, and correlationId, groupIndex, and groupSize fields shared by all objects from one message. Member display names and role IDs are opt-in.
Configuration
See the Schema section below for the full field list, types, and defaults. Notes on the fields that shape behavior:
The support settings (from Thread History Limit to Pipeline Timeout (seconds) below) are all off by default, so the node stays a generic Discord I/O source; a support-style app turns on the ones it wants.
Reply Mode
How the first answer is posted back: reply (a native reply to the message with no author ping — the default), thread (a single reused thread on the message), or channel (a plain channel message). threadName accepts {content}, threadNameMaxLength limits the resolved name (Discord accepts 1 to 100 characters, so a value outside that range is clamped to it), and threadAutoArchiveMinutes sets Discord's archive duration for threads the node creates — Discord accepts only 60, 1440, 4320, and 10080, so the field offers just those plus 0; 0 (the default) or any other value that still reaches the node is omitted and the channel's own default applies, with a debug line for an unsupported non-zero value. {content} resolves to the message text, or — for a message that carries only files — the first attachment's filename, before the length cap is applied; with neither, the name falls back to Pipeline Response. If the thread cannot be created (usually a missing Create Public Threads permission) the failure is logged and that chunk, plus the rest of the answer, is posted as a plain reply with destination reply, so a permission gap costs the thread rather than the whole answer.
If the question is deleted before the answer is posted, nothing is posted in reply mode or in thread mode (the thread cannot be created on a deleted message, and its fallback is a reply too), and with emitNoReply on the outcome is a no_reply with reason send_failed. channel mode does not reference the question, so it still posts.
Number Reply Chunks
Answers longer than Discord's 2000-character limit are split on sentence and line boundaries; fenced code blocks are closed and reopened across message boundaries. With numberChunks enabled, a reply that needs more than one message ends each one with *(2/3)* so a reader sees the order; the label is paid for by the split, so every chunk still fits the 2000-character limit, and a reply that fits in one message is never labelled.
Require @Mention
When true, the bot only processes messages in which it is directly @mentioned; @everyone and @here do not count. Useful in high-traffic channels. When false (default) it processes every message that passes the allowlists.
requireMentionChannelIds applies that gate only in selected channels, and recognizes a thread's parent channel ID.
Server IDs (Guild IDs) / Channel IDs
Server and channel allowlists. When non-empty, only messages from the listed guild/channel IDs are processed; leave both empty to listen everywhere the bot has access. IDs are matched as strings, and every entry must be a numeric Discord ID (see Configuration errors under Notes). channelIds recognizes a thread's parent channel ID. Direct messages are answered only while both lists are empty; setting either one stops DMs. Setting guildIds is recommended in production, together with turning off Public Bot (see Authentication), because with both lists empty the bot answers in any server it is added to.
Ignore Bot Messages / Allowed Bot IDs
ignoreBots (default true) drops messages from other bots to prevent loops; the bot never processes its own messages regardless. allowedBotIds permits selected bot accounts through while ignoreBots remains enabled.
Send Responses / Show Typing Indicator
sendResponses (default true), when set to false, still ingests every message into the pipeline but posts nothing back, and Backfill Limit is ignored. showTyping (default true) shows a typing indicator while the pipeline runs.
Max Attachment Size (bytes)
Attachments larger than this (default 25 MB, at most 100 MB; a larger value is clamped to 100 MB, and 0 or a negative value means the default) are skipped without being downloaded; the reported size is checked before the file is fetched.
Max Concurrent Messages
At most maxConcurrentMessages messages (default 4, 1 to 32) are processed at once, downloads included, so memory stays bounded; further messages wait their turn rather than being dropped. The limit is shared by every server and channel the bot serves, so slow pipelines delay all of them, and a message waiting for its turn shows no typing indicator yet. Values above 8, the size of the node's own pool the pipeline calls run on (see Pipeline Timeout (seconds)), do not make more pipelines run in parallel.
Text Attachment Extensions / Text Attachment Max Characters
textAttachmentExtensions and textAttachmentMaxChars control which attachments are decoded as text and sent through the text lane; once any extension is listed, any text/* MIME is also treated as text, and with the list empty (the default) every attachment is routed as a binary object. An extension may be written with or without its leading dot (md and .md both match notes.md), in any case.
Merge attachments into the question
A Discord message is one question even when it carries files, so with mergeAttachments enabled the node answers it once. A text-like attachment (one textAttachmentExtensions selects) is no longer asked about on its own: its content is folded into the message text as a Contents of attached file "<name>": block (fenced, capped by textAttachmentMaxChars, with a … (truncated) line when the cap bites; a file that turns out to hold binary content — a NUL byte — is routed as a binary attachment instead, below). Image, audio, video, and other attachments still run first, each as its own lane object with the same metadata and message SSE event as before, and every non-empty answer they produce is folded into the question as a What the pipeline found in the attached <image|audio|video|file> "<name>": block. The single text pass that follows sees the user's words, the file contents, and what the other lanes made of the media, and its answer is the reply. A message that carries only files is prefixed with The user shared the following file(s) with no message. Explain what each file is and what it does, and help them with it. so the pipeline is given a task rather than a bare document; in a thread with history (see Thread History Limit) it is framed as User's latest message: (no text; see the attached files below) with the transcript instead. Either way the message SSE event's text shows the user's own words, or for a file-only message the files, never the transcript. If the text pass produces nothing, the first non-empty attachment answer is posted instead.
groupSize then counts the objects the message actually produces: the text pass is index 0, the remaining attachments follow in attachment order from index 1, and folded text files no longer count. (The count is decided before the attachment objects are pushed, so in the one case where nothing is left to ask — no text, no text file, and no attachment answer — the objects already pushed carry a groupSize one higher than the objects that existed.)
With mergeAttachments off (the default) the node keeps its original behavior: the text and every attachment are asked independently and the first non-empty answer overall — text first, then attachments in order — is posted.
Emit Reactions
emitReactions adds a reaction event object for every reaction added to or removed from a message. The reactions Gateway intent is not privileged, and the node turns it on itself when this setting is on, so nothing needs enabling in the Developer Portal. Reaction capture covers human reactions only: a reaction whose user is the bot itself — including the feedbackEmojis the node adds to its own answers — never produces a reaction event, so a subscriber does not read the affordance as a grade. Reactions are scoped exactly like messages: guildIds, channelIds (matching a thread's parent channel as well), and ignoreBots/allowedBotIds all apply, so a reaction from outside the node's scope is dropped rather than emitted. A reaction whose channel cannot be resolved is dropped while channelIds is set, because there is then no way to tell whether it is in scope; a reactor neither the payload nor the user cache knows is treated as a human. Reactions that arrive once shutdown has begun are dropped.
Emit No Reply Events / Emit Outbound Events
emitNoReply and emitOutbound add event objects for unanswered/error outcomes and for sent replies. Both are off by default.
With emitOutbound on, every posted answer produces an outbound event carrying the posted message IDs, the destination, the answer text and complete, which is false when a later chunk failed after earlier ones were posted (Discord then shows only part of the answer). When Feedback Reactions applied any emojis, they are listed as feedbackEmojis. When sendResponses is false and emitOutbound is on, an answer produces an outbound event with no message IDs and destination: "suppressed", so shadow deployments can record what the bot would have said. An answer that was meant to be posted but could not be — every chunk failed, usually a missing Send Messages permission or a deleted question — produces no outbound event.
With emitNoReply on, a message that ends without a posted answer produces a no_reply event whose reason is one of:
no_answer: the pipeline produced no answer;send_failed: there was an answer, but every chunk failed to post;shutdown: shutdown began while the message waited for its turn, or before one of its pipeline runs started, so no further run was started for it and nothing is posted;paused: the message arrived in a thread paused by Pause After Escalation;aimed_elsewhere: Ignore Messages Aimed At Others skipped the message;non_answer: Sanitize Replies left nothing postable in the answer, on every retry;model_error: the answer (or a retry's) was recognised as an engine or model error (see Error answers);timeout: a pipeline run passed Pipeline Timeout (seconds);- any other value: the error message of the first pipeline or download error, or of an unexpected failure, clipped to 200 characters (a reason built from an exception message would otherwise be unbounded).
Capture Events To Database
emitReactions / emitNoReply / emitOutbound and the apaevt_sse broadcast end up in the task's run log, not in a table anyone can query. With captureEvents enabled the node writes the same bodies a second time, durably, into a database node connected to this source by a tool control edge — declared on the database node, for example "control": [{"classType": "tool", "from": "discord_1"}]. In the pipeline editor, draw it from the Discord node's tool handle to the database node. A node wired that way is invisible to an agent in the same pipeline (an agent only sees tools whose control edge comes from the agent), so capture does not change what the bot can do.
Use a database node that exists only for capture. The rows go through the database node's execute tool, so capture needs its Allow direct query execution (allow_execute) setting, and that setting opens raw execute, begin, commit and rollback to every caller of the node, not just to this source. Never point capture at a database node that an agent or any other tool caller can reach: add a separate database node, connect it only to this Discord source, and give it a database user with only the rights capture needs (listed below).
Capture is PostgreSQL only: the rows are written with PostgreSQL SQL (an identity column, so PostgreSQL 10 or later; JSONB; ON CONFLICT). When it resolves the database node, the node asks it once for its dialect; anything other than PostgreSQL turns capture off for the run with one warning naming the dialect, and the bot keeps answering. A node that does not answer it (it is not a database node) turns capture off the same way.
Capture is deliberately off the answering path. A finished row is put on a bounded queue (1000 rows) and one daemon thread does the talking, so a slow or dead database costs a queued row and never a Discord reply. When the queue is full the newest row is dropped and counted — dropping the oldest would discard the question and keep the answer. A failure that no retry can fix turns capture off for the run with one warning naming the cause, and the bot keeps answering: the database user was refused (permission denied), the table lacks a column capture writes, the table is missing and the database user may not create it, the database node's execute tool is off, or the connected node is not a database. A row the database refuses for its own values (a PostgreSQL data error, SQLSTATE class 22, such as invalid input or a value out of range, or a NOT NULL, foreign key or CHECK constraint of your table that this row breaks) is dropped and counted on its own, the rows after it are written as usual, and the number of such rows is logged when the node stops; five refused in a row, with no successful write between them, are treated as a problem with the table and start the 60-second wait below. After any other failed write (usually the database being down or unreachable), rows are dropped and counted for 60 seconds, then the next one is tried. The warning for such a failure repeats at most once per 30 seconds with the running counts, and one line records when writes start working again and how many rows were dropped meanwhile. Dropped and failed rows are never retried. When the node stops — on Stop, after a fatal Gateway error, or after a failed start — it first closes the Gateway client, waiting for messages still being handled for up to two seconds while capture is on (five while it is off) and cancelling those that are not done, and then stops the writer, which gets two seconds in all: to queue its stop marker behind the rows already waiting (this only waits when the queue is full) and to write what is queued. If a write is still stuck after that, the writer stops as soon as it returns, borrows no further pipe (nor hands back the one the stuck write held, since the node is being torn down), and logs exactly how many queued rows were left unwritten; an event a handler emits while or after the writer stops is not written either, and is counted in a warning. On Stop the engine force-kills the process five seconds after asking it to stop: the two-second grace and the two-second drain leave about a second for closing the Gateway client, and when all of it takes longer than five seconds the rows still queued are lost without that log line. On Windows the engine kills the process outright on Stop, so nothing is drained there. The database node itself connects when the pipeline starts, so a database that is down at startup stops the pipeline from starting; whoever starts the bot should check the database first. A capture warning never repeats the text of the row it is about: the database's own error message is passed on with that text replaced by <row text> (a text shorter than 8 characters is left in place, since replacing it everywhere would garble the message), and a captureNodeId or captureTable value that fails its check (a node id not connected to this source, a table name that is not a valid identifier) is shown by at most its first 12 characters (followed by … when longer), as the node's other configuration messages are, so a secret pasted into either field by mistake is not shown in full. A node id found on the tool edge, or detected there, and a table name that passed its check are names, and are shown whole.
Rows follow the discord_events contract: one row per event, keyed (source, message_id, event_type, event_key) so a message, reply or no_reply the Gateway delivers again is ignored (a reaction delivered again is not, since its key holds the time the node received it), while two Discord sources that share one table and see the same message each keep their own row (give them different captureSource labels, below). event_key is empty for a reply. For a message row it names the part of the message the row is: text for the text pass, <lane>:<groupIndex> for each attachment (binary:1, or text:2 for a text file asked about on its own with mergeAttachments off), with :retry:<n> appended for a retried pass (text:retry:1), so a message's text and every attachment each keep their own row. For a no_reply it is the reason code (no_answer, non_answer, model_error, send_failed, shutdown, paused, aimed_elsewhere, timeout), or error for a reason that is exception text, which can differ between deliveries (the row's payload then says reason: "error" too: the exception text, which can carry account details or internal URLs, is broadcast but never stored); and it is <userId>:<emoji>:<add|remove>:<epoch ms> for a reaction. thread_id is the thread when there is one and the question's own message id otherwise. occurred_at is when the event happened: for a message row, the time Discord says the message was sent (createdAt, so a message replayed by Backfill Limit keeps its real time), and for every other row the time the node handled the event; captured_at is when the row was inserted. payload holds the broadcast body ({schemaVersion, eventType, metadata, ...}), with one difference: the broadcast clips a message event's text at 2000 characters, while the capture row stores the user's whole message (Discord allows up to 4000 characters), in both text and payload. With mergeAttachments on, a message row stores only the user's own text: the folded text-file contents and the other lanes' answers are not stored, and a message with no text of its own has an empty text. The text column is clipped to 8000 characters, which only a text file asked about on its own (mergeAttachments off) or a long answer can reach; payload keeps more of it, as every string in payload is clipped at 65536 characters (ending in …), so a queued row stays small even for a text file read with textAttachmentMaxChars set to 0. NUL characters, which PostgreSQL cannot store in text or jsonb (a UTF-16 text file decoded as text is full of them), are removed from both. outbound, no_reply and reaction rows exist only when the matching emitOutbound / emitNoReply / emitReactions option is also on, because those events are not produced at all when it is off; message rows are always written. Every row is queued before the node opens the pipeline object for its event, so a question or event whose pipeline object cannot be opened is still recorded.
Capture never prunes rows, including rows for messages later edited or deleted in Discord (the node does not handle edits or deletions), and payload keeps the full text — plus display names and role IDs with includeMemberMetadata. Retention and deletion are the operator's job, for example a scheduled DELETE FROM discord_events WHERE captured_at < now() - interval '90 days'.
Capture Database Node / Capture Table / Capture Source Label
captureNodeId names the database component to write to; leave it empty when exactly one database tool node is connected. A configured id is checked once against the nodes connected to this source by a tool control edge, and one that is not among them turns capture off for the run with one warning. captureTable (default discord_events) is the table. Before its first write of a run the node asks once whether the table exists, with SELECT to_regclass('"<table>"'), which needs no privilege on the table; only when the answer is NULL does it run CREATE TABLE IF NOT EXISTS plus its two indexes. So the first row into a new table is not a failed INSERT, which the database node would log at error level together with the row's values. If an INSERT still fails because the table does not exist (it was dropped during the run, or the check's answer could not be read), the node creates it and retries the insert once. So the database user needs INSERT on the capture table, and CREATE on its schema only if the table does not exist yet and the node must create it. A user that may only insert into a table created beforehand needs exactly GRANT INSERT ON <table> TO <user> (plus USAGE on the table's schema, which every user has on public unless it was revoked): seq is an identity column (BIGINT GENERATED BY DEFAULT AS IDENTITY), so no grant on a sequence is needed, and the insert's ON CONFLICT DO NOTHING names no conflict columns, so it needs no SELECT or UPDATE (PostgreSQL wants SELECT on the columns of a named conflict target, even for DO NOTHING). A table created by hand must declare seq the same way; one declared BIGSERIAL would also need GRANT USAGE ON SEQUENCE <table>_seq_seq TO <user>. An invalid name (anything outside letters, digits and underscore, not starting with a digit, at most 54 characters) is refused with a warning and capture stays off for that run. The name is lower-cased and double-quoted in every statement, so Discord_Events means the table discord_events and a reserved word such as user works. The limit is 54 rather than Postgres' own 63 because the constraint and index names are derived from the table name by appending $dedupe, $thread, and $occurred: a longer name would have those truncated at 63 bytes, so two tables differing only past the cut would collide on them. A table name may not contain $, so a derived name can never be another capture table's name. Each row's source column is discord:<node type> — in the engine that is discord:discord for every Discord source, so captureSource is how two Discord sources sharing one capture table are told apart, and what lets the pipeline record what kind of pipeline wrote the row (letters, digits and _ . : + @ -, up to 128 characters; an invalid label, an unresolved ${NAME} or <REDACTED> included, is reported in the task's warnings, shown by at most its first 12 characters, and the default label is used instead).
To create the table in advance (for example for a database user that may only insert), run exactly what the node would run. For the default table:
CREATE TABLE IF NOT EXISTS "discord_events" (
seq BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
event_type TEXT NOT NULL,
message_id TEXT NOT NULL,
event_key TEXT NOT NULL DEFAULT '',
thread_id TEXT,
channel_id TEXT,
guild_id TEXT,
author_id TEXT,
author_is_bot BOOLEAN,
occurred_at TIMESTAMPTZ NOT NULL,
text TEXT,
payload JSONB NOT NULL,
source TEXT NOT NULL DEFAULT '',
captured_at TIMESTAMPTZ NOT NULL DEFAULT now(),
CONSTRAINT "discord_events$dedupe" UNIQUE (source, message_id, event_type, event_key)
);
CREATE INDEX IF NOT EXISTS "discord_events$thread" ON "discord_events" (thread_id);
CREATE INDEX IF NOT EXISTS "discord_events$occurred" ON "discord_events" (occurred_at);
For another captureTable, put its lower-cased name in place of discord_events everywhere, including the constraint and index names. Keep the UNIQUE (source, message_id, event_type, event_key) constraint: every insert is ON CONFLICT DO NOTHING, and that constraint is what makes a redelivered event a conflict. A table made by hand without it still takes every row, but stops deduplicating, so a redelivered Gateway event is stored twice. The two indexes only speed up reads.
Include Member Metadata
includeMemberMetadata adds display names and member/mentioned role IDs to the metadata and requires the privileged Server Members Intent (see Authentication).
Allowed Mention User IDs / Allowed Mention Role IDs
allowedMentionUserIds and allowedMentionRoleIds are the only outbound mention exceptions; leaving them empty preserves suppress-all behavior. Both lists keep plain ASCII-digit Discord IDs: any other entry is dropped with a debug line, because a single non-numeric entry would otherwise fail every outbound send and silence the bot entirely. An entry that is still an unresolved variable (${NAME} or <REDACTED>) is dropped too, with a warning in the task's warnings naming the field.
Without teamMentionAlias, every role in allowedMentionRoleIds may be pinged by any answer. With it set, an allowed role is pinged only when its mention is in the part of the answer that may hand off, outside code: in a raw agent scratchpad posted with sanitizeReplies off, that is only the final text (see Team Mention Alias), so a role mention in leaked reasoning is posted without pinging. Each user also gets at most one role ping per hour across every role in allowedMentionRoleIds (see Team Mention Alias for how the hour is counted). allowedMentionUserIds are not limited this way.
Backfill Limit
Disabled by default (0; at most 100, a larger value is clamped). backfillLimit processes the most recent N messages per configured channel (or, with no channel allowlist, every readable text channel in the allowed guilds), oldest first, at startup, through the same gates and processing path as live messages. A channel whose history cannot be read, or a channelIds entry that is not a number, is logged and skipped, and the remaining channels are still replayed. On a restart, backfill skips what the bot already handled, judged from the window it fetched: a message that has a thread, a message one of the bot's messages in the window replies to, a message that carries a reaction the bot added (the ackEmoji acknowledgement of an aimed_elsewhere message), and, in channel mode, every message before the bot's latest post in that channel. The thread and reply checks apply whatever replyMode is, so changing it between runs does not answer old messages again. A message that ended without anything visible in Discord (no_answer, non_answer, model_error, timeout) cannot be told apart from an unanswered one and is processed again. Backfill does not run at all while sendResponses is false: nothing is posted then, so every restart would replay the whole window and emit its events again. The node also remembers the last 1000 message ids it handled, shared by the live path and backfill, so a message that arrives live while its channel is still waiting to be backfilled is answered once. That memory is in-process only: an unanswered message older than the window is not replayed, and one the bot answered in a way the window does not show (for example a reply that has scrolled out of it) can be answered again. Backfilled messages wait for a Max Concurrent Messages slot like any other, and once shutdown has begun none are processed.
Thread History Limit / Thread History Max Characters
When a message arrives in a thread and threadHistoryLimit is greater than zero, the node fetches up to that many messages from before the one being answered — the limit counts earlier messages, so threadHistoryLimit: 1 gives one line of context — drops system and empty ones, orders them oldest first (a thread the bot made from a message in thread mode opens with an empty starter message; the original question in the parent channel is shown in its place, and left out if it cannot be read), and renders one <name>: <content> entry each — the bot's own messages under its display name followed by (this bot), a suffix no username can carry, so a user named like the bot cannot speak as it; other bots and webhooks (whose names are free text) under their name followed by (bot); everyone else under their username. Each message is clipped to 1000 characters (with a trailing …, and a closing fence when the clip or the message itself leaves a code block open), and its continuation lines are indented by two spaces, so a line break inside one message (a newline, a carriage return, or a Unicode line separator) cannot start a line that looks like another speaker (the bot included). While ignoreBots is on, messages from other bots are left out unless the bot is in allowedBotIds; with it off they are kept, as the node answers them too. The text handed to the pipeline becomes User's latest message: <content> followed by Earlier in this thread (oldest first, for context): and the transcript; a transcript longer than threadHistoryMaxChars keeps its tail behind an … line, starting at the first whole speaker line inside the cap (a message cut in the middle is dropped, unless it is all that is left). threadHistoryLimit is at most 100 and threadHistoryMaxChars at most 20000 (a larger value is clamped); as with every number among the support settings, 0 (or a negative value) turns the context off, for either of them. The message SSE event still carries the user's own words in text and reports in contextChars how many characters the node added around the user's own words: the thread transcript and any folded files. A failed history fetch is logged and the message is processed without context.
Pause After Escalation / Escalation Markers
With escalationPause enabled, an answer posted into a thread that contains an escalation marker pauses that thread (after a partial delivery, only when a chunk that was posted contains it): further messages there are ignored until somebody writes an @mention of the bot in their message, which resumes it. Only a mention in the text counts: Discord's Reply (with its ping on, the default) notifies the bot without one, so replying "ok thanks" to the hand-off line keeps the thread paused. There is no role check: any member of the thread can resume it this way (and, with ignoreAimedAtOthers on, pause it by addressing somebody else). The effective markers are escalationMarkers plus a role mention for every id in allowedMentionRoleIds (a role the node may ping is the team it hands off to). Each escalationMarkers entry is one phrase, kept whole: spaces and commas inside it do not split it. A marker counts only as a whole word (ESCALATED is not found in NOTESCALATED; an edge that is punctuation, as in a <@&id> role mention, needs no boundary) and never inside code (a fenced block or an inline backtick span). The pause set is in-memory, so the first time this process sees a thread it reconstructs the state from the last 50 messages — a bot message with a marker pauses, a later message whose text mentions the bot resumes — and a skipped message emits a no_reply event with reason paused. If that history cannot be read the outcome is unknown rather than "not paused": the message in hand is answered, but the thread stays unreconciled so the next message tries again instead of being fixed as open for the life of the process.
While escalationPause is on, messages that arrive in the same thread are handled one at a time, so a follow-up that arrives while an escalating answer is still being produced is checked against the pause after that answer has been posted — otherwise both would be answered. Messages in different threads, and every message when the pause is off, are processed concurrently as before.
A message skipped as paused (or as aimed_elsewhere, below) is never ingested, so no message event describes it. Its no_reply payload therefore also carries text — the message content, clipped at 2000 characters, exactly as a message event would report it — so a team member's reply inside a paused thread is still recorded downstream. Every other no_reply reason keeps its {reason} payload, because the question it belongs to already has a message event.
Team Mention Alias
teamMentionAlias makes the hand-off actually ping somebody. A prompt usually tells the agent to escalate by writing a literal team name, which Discord renders as plain text; when the alias is set and allowedMentionRoleIds is not empty, every case-insensitive, whole-word occurrence of it in an answer outside code, fenced or inline (whitespace inside the alias matches any run of whitespace, so @RocketRide team matches across a line break; Support does not match inside supportive or a URL path such as /support/page) becomes <@&id> for the first allowed role id. The substitution is made only on the text that is finally posted, after reply hygiene, so leaked reasoning that merely names the team never pings it; the injected mention still pauses the thread, because escalation detection after the send sees it. When a final answer is itself scratchpad, the alias counts as an escalation marker on its final hand-off line, so the hand-off line keeps it and it becomes the ping; a scratchpad with no final answer never hands off (see Sanitize Replies). With sanitizeReplies off a raw scratchpad (recognised as under Sanitize Replies) is posted as it came, but the same rule holds: only its final text (after the last Final Answer:, or inside a final envelope) may hand off, so the alias there becomes the ping and pauses the thread, while a scratchpad with no final text keeps the alias as plain text, is sent with the team role left out of the allowed mentions, and never pauses the thread (also when the pause is rebuilt from the thread's history). It applies whether or not sanitizeReplies is on; the default (empty) leaves answers untouched.
Setting teamMentionAlias lets any user trigger a role ping: whoever gets the model to write the alias (by asking for a human, or asking who the team is) makes the bot ping a role they may not be allowed to mention themselves. To bound that, each user gets at most one team ping per hour, wherever they ask (a new thread or channel does not reset it); a later answer to the same user in that hour is posted with the alias as plain text, and the send leaves every role in allowedMentionRoleIds out of the allowed mentions, so a literal <@&id> the model writes (echoed from the thread, or because the user asked for it) does not ping either. While the alias is set, the hour covers every allowed role, not only the team role: a delivered mention of any of them starts it, and while it runs none of them can be pinged for that user. Allowed users can still be mentioned. A role mention counts only in the part of the answer that may hand off, as for the alias: in a raw scratchpad, a <@&id> in the reasoning is posted without pinging and does not start the hour, and neither does one in code (fenced or inline). When the answer is split over several messages, a role is allowed only on the message that carries its mention from that part, so the same role mentioned in reasoning or code in another message does not ping. The hour is reserved just before the message carrying the mention is sent, so two messages from the same user handled at once ping only once, and it is released again when no posted message carried the mention: a failed send, or sendResponses off, does not start it. It still counts as a hand-off, so it pauses the thread under escalationPause like the ping would. In the thread history handed to the pipeline the team role's mention is shown as the alias, the name the prompt tells the model to write; a mention the model copies anyway follows the same rules as the alias. The cooldown is kept in memory, so a restart resets it.
Ignore Messages Aimed At Others / Acknowledgement Emoji
With ignoreAimedAtOthers enabled, a message that mentions another user or any role, or replies to a message the bot did not write, is treated as somebody else's conversation: the node reacts with ackEmoji (when set; surrounding spaces are ignored, as for each feedbackEmojis entry), posts no answer, emits no_reply with reason aimed_elsewhere (with the message text, as for paused), and — when escalationPause is also on — pauses the thread it arrived in. That pause is kept in memory only and is not rebuilt after a restart: the history rebuild looks for bot messages that carry an escalation marker, and an aimed_elsewhere skip posts none, so after a restart such a thread is answered again until something pauses it anew. A direct @mention of the bot always wins over this gate. A reply to the author's own earlier message (a common way to add details) is not aimed elsewhere unless it also mentions somebody else.
Feedback Reactions / Feedback Emojis
With feedbackReactions enabled, the node adds each emoji in feedbackEmojis (default ✅ then ❌), in order, to the last posted chunk of an answer, so a reader grades it in one click. Each entry is one emoji, kept whole. Reactions are added only when the whole answer was posted: after a partial delivery (complete is false) the last posted chunk is not the end of the answer, so nothing is added. Failures are logged and never affect the reply; the emojis actually applied appear as feedbackEmojis on the outbound event.
Sanitize Replies
sanitizeReplies does two things: it strips leaked agent reasoning from an answer (below), and it retries an answer that was only reasoning or empty (see Retries on a non-answer), so with it on one message can run the text pass up to 1 + nonAnswerRetries times, even for a pipeline that is silent on purpose. It also widens the error check to generic error-shaped openings such as Error:; engine and provider errors are suppressed whether or not it is on (see Error answers).
With sanitizeReplies enabled, an answer wrapped in a {"type": "final", "content": "..."} envelope is unwrapped to its decoded content first (an envelope whose JSON escapes do not decode falls back to the raw captured string). Only an envelope that is the whole reply, or that ends a reply opening with a scratchpad label, is unwrapped; an answer that shows one as an example is left alone. The result is then trimmed to what follows the last Final Answer: that starts a line outside a code fence, so prose or a code sample that mentions the label is not cut; if it still opens with Thought: or Action Input:, or holds a tool call outside a code fence (a line starting with Action: and Action Input: on the next non-blank line; some agents strip the leading Thought:), it is leaked agent scratchpad rather than an answer, and it is replaced by a short hand-off line that keeps the escalation marker when it came from a Final Answer: or envelope and its final line (the last non-empty line, when that line is not itself a Thought: or other reasoning line) carries one, or suppressed entirely (with a no_reply event, reason non_answer) otherwise. A scratchpad with no Final Answer: and no envelope is never a hand-off, whatever its last line says: that line may be tool output (an Observation: that says to contact the team), not the agent handing off. Sanitizing happens before chunking, so nothing partial is ever posted.
Error answers
Whatever sanitizeReplies says, the node never relays an engine or provider failure as an answer: a raw provider exception can carry account details, key fragments, or internal URLs. A reply is always treated as an error when it:
- opens with the engine's
**LLM error** — <ExceptionName>:or the agent'sLLM error:(soLLM error — this means...andLLM error-handlingare posted); - is only the sentence
An error occurred with the <provider> API.(the API,the OpenAI API,the Baidu Qianfan API; optionally after an exception name such asValueError:), so an answer that opens with it and goes on to explain it is posted; - opens with a provider error an agent wrapped in its own text:
Deep agent <stage> failed: <ExceptionName>:,LangChain agent <stage> failed: <ExceptionName>:,Unable to produce final answer: ..., or AWS'sAn error occurred (<Code>) when calling the <Operation> operation:; - opens with a
chat.py:NN/agent.py:NNengine frame, or a Python traceback (Traceback (most recent call last):with aFile "...line under it); - opens with
_run failed(or the engine'sagent base _run failedlog line); - opens with a provider status followed by its payload, such as
Error code: 429 - {...}(the payload starts with{,[, or<, soError code: 401 - Unauthorized means...is posted; optionally after an exception name such asRateLimitError:, never after another word such asNote:).
With sanitizeReplies on, generic error-shaped openings count too, because a real answer can start with one (Error: ENOENT means the file does not exist is posted with it off):
Exception:,Error:, or a label named after an exception (ValueError:,RuntimeException:);- a provider status without the payload, such as
Error code: 404.
The reply is checked as it arrived and, when the agent wrapped its answer, as the text after the last Final Answer: or inside a {"type": "final"} envelope, so a wrapped error is caught whether or not the wrapper would be stripped. Each code block is replaced by a placeholder line before these checks, so the text after a leading code block is not taken as the reply's opening, and every shape counts only where the reply opens with it, so an answer that quotes the user's error or traceback is still posted.
Such a reply is not posted and not retried: it is reported as no_reply with reason model_error, and a task warning names the message (never the answer text). A retry's answer is checked the same way, raw and after sanitizing, and an error there ends the retries. With sanitizeReplies off scratchpad is posted as the pipeline returned it, and nothing is retried.
Retries on a non-answer
A pure-scratchpad answer is usually transient — the same question answers normally on a second run — so before giving up the node asks the text pass again, up to nonAnswerRetries times (default 1, maximum 3; 0 restores the suppress-immediately behavior). An empty answer (or one that is only whitespace) is retried the same way, unless the pipeline recorded a processing error for that message, in which case asking again would only repeat the failure. A retry re-runs the identical pipeline text, metadata, and thread context under a different object name (<messageId>:retry1), so a stateful prompt node does not mistake it for the object it already answered, and its message SSE event carries retry: <n> alongside lane, text, and contextChars (the original run carries no retry key). The first re-run whose sanitized answer is non-empty is posted; when every attempt is scratchpad the node emits no_reply with reason non_answer, and when every attempt is empty it keeps the reason it would have reported anyway (no_answer, or the processing error). Each attempt is its own pipeline object, so all of them count through the task's completed/failed totals. A message that carries only attachments has no text pass and is never retried, and no retry starts once shutdown has begun. Retries apply only while sanitizeReplies is on.
Pipeline Timeout (seconds)
By default a message waits for its pipeline as long as it takes. pipelineTimeoutSeconds (default 0, off) gives up on a run that has not answered within that many seconds and emits no_reply with reason timeout; each run (the question, each attachment, each retry) gets the full limit. Pipeline runs use the node's own pool of 8 workers, separate from the one event emits use, so hung runs cannot hold up no_reply, outbound, or reaction events. The limit covers waiting for a free worker as well as the run: with every worker busy a new message waits for one, and reports timeout when none frees up and answers within the limit. A timed-out run is not stopped: it keeps its worker until it finishes in the background, returns its pipe, and its answer is dropped, so enough hung runs leave no worker for new messages until they return.
Authentication
This node requires a Discord bot token. Create a bot in the Discord Developer Portal:
- Open Applications and click New Application.
- Name it and click Create.
- Under Bot, use Reset Token to reveal the bot token. It is shown once; keep it secret.
- Enable Message Content Intent under Privileged Gateway Intents. Also enable Server Members Intent when using member metadata.
- Still under Bot, turn off Public Bot unless anyone should be able to add the bot to their own server. A new application is public by default.
- Add the bot to your servers with the OAuth2 URL generator (
botscope plus the permissions listed under Notes).
Paste the token into the discord.botToken field. In production, also set guildIds to the servers the bot should serve: with it and channelIds both empty (the default) the bot answers in every server it is added to, and the node says so in the task's warnings at start. A missing token, an invalid token, or a missing Message Content Intent fails the source with an actionable status rather than idling silently.
The node tile shows whether a bot token is configured (Token: configured or Token: missing); it does not report whether the bot connected, which the task's status line does. The monitor panel shows only the last 6 characters of the token so you can confirm which bot is connected without exposing the secret.
Notes
Prerequisites
- Message Content Intent must be enabled in the Developer Portal (
Bot > Privileged Gateway Intents); without itmessage.contentarrives empty. The node fails fast if the intent is missing. - The bot needs View Channels / Read Messages, Send Messages, and Read Message History in the channels it serves. Apply them via the OAuth2 URL generator or per role/channel.
- For
threadreply mode, the bot additionally needs Create Public Threads and Send Messages in Threads. In a DM or a channel that cannot host a thread — or when creating the thread is refused — the node falls back to a plain reply. - The opt-in support behaviors need Add Reactions (
ackEmoji,feedbackReactions) and Read Message History (threadHistoryLimit,escalationPausereconstruction,backfillLimit). Missing either is logged and skipped rather than failing the message.
Message handling and replies
- Discord's own system notices (joins, pins, boosts, "started a thread") and messages with neither text nor attachments are dropped before any gate or pipeline work: there is nothing in them to answer.
- With
mergeAttachmentson, one answer is posted per message: the text pass that has seen the folded files and the other lanes' answers. With it off, the first non-empty pipeline answer — text first, then attachments in order — is posted back. Optionalno_replyandoutboundevent objects make those outcomes observable downstream. - A message may carry up to 10 attachments. Every attachment is downloaded and routed into the pipeline (each counted independently); a text-like attachment is folded into the text pass rather than routed on its own while merging is on.
- Long answers are chunked at Discord's 2000-character limit on sentence and line boundaries.
- Outbound content uses a restrictive allowed-mentions policy. Only configured user and role IDs can be pinged;
@hereand@everyoneare never enabled.
What message text is broadcast and stored
Every object the node opens (messages, attachments, and the reaction, no_reply, and outbound events) is also broadcast as an apaevt_sse event of type discord ({schemaVersion: 1, eventType, metadata, ...payload}), so a UI subscribed to SSE on the task can follow the conversation without reading pipeline traces. The broadcast is not live-only: the engine also writes every SSE body into the task's run log, so it is visible to every client monitoring the task and is kept in the run log afterwards.
The node puts Discord message text into the apaevt_sse bodies, and therefore into the task's run log, in exactly four places:
- the question text, in the
textfield of eachmessageevent for the text lane (clipped at 2000 characters). WithmergeAttachmentson, a message that has no text of its own carries the merged question instead, which includes the folded text-file contents and what the pipeline found in the other attachments; - the decoded contents of each text-like attachment (one
textAttachmentExtensionsselects), framed with its filename, in thetextfield of its ownmessageevent whenmergeAttachmentsis off (clipped at 2000 characters); - the answer text, in the
textfield of eachoutboundevent (only whenemitOutboundis on); - the text of a message the node skipped, in the
textfield of itsno_replyevent (reasonspausedandaimed_elsewhere, only whenemitNoReplyis on, clipped at 2000 characters). These are usually messages between people — a team member answering inside a paused thread, or users talking to each other — so conversations the bot does not take part in are broadcast and kept in the run log too.
Binary attachments are never broadcast, only their MIME type and size. Every event's metadata also carries Discord IDs and attachment filenames, plus display names and role IDs when includeMemberMetadata is on, and a no_reply reason can quote an exception message. Operators need this list for their privacy notice: anyone who can monitor the task, and anyone who can read its run log, can read these messages. With captureEvents on, the same bodies, text included, are also stored in the capture table (see Capture Events To Database), so anyone who can read that table can read them too. A capture write that fails is logged by the database node, at error level and together with the row's values (the message text included), once for each failed row, so anyone who can read the server log can read those rows. Capture stops writing after a failure that cannot fix itself, and after any other failure waits 60 seconds before it writes again, so a lasting problem logs one row and an outage about one row a minute; a row refused for its own values is logged once, as that row, and at most five such rows in a row are tried before the wait. There, a message row's text is not clipped at 2000 characters: it holds the user's whole message, or a text attachment's whole decoded text (still capped by textAttachmentMaxChars, and at 65536 characters); with mergeAttachments on it holds only the user's own text, never the merged question. A no_reply row whose reason was an exception message stores the reason error instead of that message.
Attachments and MIME detection
- Each attachment's reported size is checked against
maxAttachmentBytesbefore download; oversized files are skipped with a debug log. - Files are routed by MIME type: the node uses Discord's reported
content_typefirst (lowercased, with any; charset=...parameters stripped) and falls back to the file extension: first the node's own table (e.g..pdfmaps toapplication/pdf), then Python's built-inmimetypestable (so.avireaches thevideolane,.bmptheimagelane, and.csvistext/csv). The host's own MIME table (the Windows registry,/etc/mime.types) is never consulted, so a file routes the same way on every host; anything still unrecognized defaults toapplication/octet-streamand flows to thetagslane. - When
textAttachmentExtensionslists any extension, those files andtext/*MIME attachments are decoded, capped bytextAttachmentMaxChars(0means no limit), framed with their filename, and sent through the text lane — folded into the message's own text pass whilemergeAttachmentsis on, or as their own object when it is off. Both paths decode the same way: a file that starts with a UTF-16 byte order mark (Windows Notepad "Unicode", PowerShell 5.1 redirects) is read as UTF-16, anything else as UTF-8 with a leading UTF-8 byte order mark dropped, and invalid bytes are ignored. A file whose decoded text still holds a NUL is binary content, not text, and is routed as a binary object on both paths.
Reliability and limits
- Rate limits: discord.py handles Discord 429 responses internally (honoring
Retry-Afterwith backoff); the node keeps a defensive extra retry for anyRateLimitedit surfaces. - Configuration errors: a list setting that starts with
[but is not valid JSON is reported in the task's warnings with the setting's name. InguildIds,channelIdsorrequireMentionChannelIdsit fails the start instead, since the bot would otherwise answer nothing (or, for the mention list, answer without the mention). OnlyROCKETRIDE_*server variables are resolved: an unset${ROCKETRIDE_NAME}reaches the node as literal text, and any other${NAME}as the literal<REDACTED>. Either one inbotToken,guildIds,channelIds, orrequireMentionChannelIdsfails the start naming the problem (for exampleDiscord Bot: <field> uses the variable <NAME>, which is not set on this server (only ROCKETRIDE_* server variables are resolved)), because it would match nothing (inrequireMentionChannelIds, the mention gate would silently never apply). InallowedBotIds,allowedMentionRoleIds, orallowedMentionUserIdsit produces a warning naming the field. A set variable whose value is empty arrives as an empty string, soguildIds,channelIds, orrequireMentionChannelIdsgiven items that resolve to no IDs (for example[""]) also fails the start, instead of being read as an empty list that means "everywhere"; a list that is genuinely empty still means all. Any other entry in those three lists that is not a Discord ID, plain ASCII digits with at most 20 of them (a channel or server name, a pasted mention such as<#123>, or two IDs run together), fails the start too, naming the field and the entry; for a pasted mention the message gives the ID inside it. InallowedBotIdssuch an entry produces a warning instead. An entry that is not a mention is shown by at most its first 12 characters (followed by…when longer), so a token or secret pasted into a list by mistake is never shown in full in the task status or the logs. JSON list items are trimmed and split on commas and whitespace, like a bare string, except inescalationMarkersandfeedbackEmojis, whose entries are phrases and emojis and are kept whole. - Lifecycle: a terminal Gateway failure (invalid credentials, missing intent, or an unexpected disconnect) fails the source promptly; a successful start runs until the engine shuts the subprocess down.
- No edit/delete handling: only
MESSAGE_CREATEevents are processed. - Byte accounting: processed message and file sizes are reported via
monitorCompleted()/monitorFailed().
Schema
| Field | Type | Description | Default |
|---|---|---|---|
Pipe.source.parameters | Discord Bot Configuration | ||
discord.ackEmoji | string | Acknowledgement Emoji Emoji added to a message that is skipped as aimed at somebody else. Empty adds no reaction. | "" |
discord.allowedBotIds | array | Allowed Bot IDs Bot user IDs allowed through when Ignore Bot Messages is enabled. | [] |
discord.allowedMentionRoleIds | array | Allowed Mention Role IDs Role IDs that outbound pipeline responses may mention. With Team Mention Alias set, a role is pinged only when its mention is in the answer itself (not in leaked agent reasoning or code), and each user gets at most one role ping per hour (reset on restart); within that hour no allowed role can be pinged in answers to that user. Without it, every listed role may be pinged in any answer. | [] |
discord.allowedMentionUserIds | array | Allowed Mention User IDs User IDs that outbound pipeline responses may mention. | [] |
discord.backfillLimit | number | Backfill Limit Most-recent messages to process per readable channel at startup, at most 100; messages the bot already replied to, made a thread for, or reacted to are skipped. Zero disables backfill, and it never runs while Send Responses is off. | 0 |
discord.botToken | string | Bot Token Discord bot token from the Developer Portal (keep this secret - do not share) | |
discord.captureEvents | boolean | Capture Events To Database Write every event this node handles — question, reply, no-reply, reaction — into a database node connected to this source with a tool control edge. PostgreSQL only: on any other database capture turns itself off with a warning. Needs Allow direct query execution on the database node, which opens raw SQL to every caller of that node: use a separate database node connected only to this source, never one an agent can reach. The database user needs only INSERT on the capture table (no SELECT, and no grant on a sequence: its seq column is an identity column), and CREATE on its schema only if the table does not exist yet and must be created. Question rows are always written; outbound, no_reply and reaction rows exist only when the matching Emit Outbound Events (emitOutbound), Emit No Reply Events (emitNoReply) or Emit Reactions (emitReactions) option is also on, because those events are not produced at all when it is off. Writes happen off the answering path; if the database is unreachable the bot keeps answering. A failure that cannot fix itself (permission denied, a table of the wrong shape, Allow direct query execution off) turns capture off for the run with one warning; after any other failed write, rows are dropped for 60 seconds before the next try, with at most one warning every 30 seconds. The database node logs each failed write with the row's values. | false |
discord.captureNodeId | string | Capture Database Node Component id of the database node to write to. Empty: the only database tool node connected to this source. That node needs Allow direct query execution, which opens raw SQL to every caller of that node: use a separate database node connected only to this source, never one an agent can reach. | "" |
discord.captureSource | string | Capture Source Label Text written to each captured row's source column, e.g. to tell which pipeline wrote it, and the only way to tell two Discord sources sharing one capture table apart. Letters, digits and _ . : + @ - only, up to 128 characters. Empty: discord: | "" |
discord.captureTable | string | Capture Table Table the captured events are written to. Checked for once before the first insert of a run, and created if it does not exist. Letters, digits and underscore only, not starting with a digit, at most 54 characters (Postgres truncates identifiers at 63 bytes, and this table's index and constraint names are derived from its name). Used lower-case: Discord_Events means discord_events. | "discord_events" |
discord.channelIds | array | Channel IDs List of channel IDs to listen to. Leave empty to listen to all channels. | [] |
discord.emitNoReply | boolean | Emit No Reply Events Emit an event when processing produces no answer or raises an error. The reason is no_answer, send_failed, shutdown, paused, aimed_elsewhere, non_answer, model_error or timeout; any other value is an error message clipped to 200 characters. | false |
discord.emitOutbound | boolean | Emit Outbound Events Emit an event after posting a pipeline response to Discord. | false |
discord.emitReactions | boolean | Emit Reactions Emit raw reaction add and remove events into the pipeline. | false |
discord.escalationMarkers | array | Escalation Markers Text markers that mark an answer as escalated (for example a team role mention). Allowed Mention Role IDs are added automatically. | [] |
discord.escalationPause | boolean | Pause After Escalation After an answer containing an escalation marker is posted into a thread, stay quiet in that thread until the bot is mentioned again. | false |
discord.feedbackEmojis | array | Feedback Emojis Emojis added, in order, to the last posted answer chunk when Feedback Reactions is enabled. | ["✅","❌"] |
discord.feedbackReactions | boolean | Feedback Reactions Add feedback emojis to the last posted answer chunk so readers can grade it in one click. | false |
discord.guildIds | array | Server IDs (Guild IDs) List of Discord server IDs to listen to. Leave empty to listen to all servers the bot is in. | [] |
discord.ignoreAimedAtOthers | boolean | Ignore Messages Aimed At Others Skip messages that mention another user or role, or reply to a message the bot did not write, unless the bot is mentioned. | false |
discord.ignoreBots | boolean | Ignore Bot Messages If true (default), messages from other bots are ignored to prevent loops. | true |
discord.includeMemberMetadata | boolean | Include Member Metadata Include display names and role IDs; requires the Discord members intent. | false |
discord.maxAttachmentBytes | number | Max Attachment Size (bytes) Maximum size of attachments to download. Larger files are skipped. Default 25 MB, at most 100 MB. | 26214400 |
discord.maxConcurrentMessages | number | Max Concurrent Messages How many messages are processed at once. Further messages wait their turn; none are dropped. | 4 |
discord.mergeAttachments | boolean | Merge attachments into the question When enabled, text-like files are folded into the message text and the answers the pipeline gives for image, audio, and video attachments are folded in as context before the text pass, so one reply covers everything. When disabled (the default), text and every attachment are asked separately and the first non-empty answer wins. | false |
discord.nonAnswerRetries | number | Retries on a non-answer While Sanitize Replies is on, re-run the text pass up to this many times when the reply was only agent scratchpad (such as Thought: lines) or empty, so one message runs the pipeline at most 1 + this many times. An error answer is never retried. Zero never retries. | 1 |
discord.numberChunks | boolean | Number Reply Chunks When an answer is too long for one Discord message, end each message with its position, for example (2/3). A reply that fits in one message is never labelled. | false |
discord.pipelineTimeoutSeconds | number | Pipeline Timeout (seconds) Give up on a message whose pipeline has not answered after this many seconds and report a no_reply with reason timeout instead of posting. Each pipeline run (the question, each attachment, each retry) gets this long. The limit includes waiting for a free pipeline worker. The run itself is not stopped: it keeps its worker until it finishes in the background, and its late answer is dropped. Zero (default) waits as long as it takes. | 0 |
discord.replyMode | string | Reply Mode How the bot sends answers: 'channel' (post as normal message), 'reply' (reply to the message), or 'thread' (post in a thread). | "reply" |
discord.requireMention | boolean | Require @Mention If true, the bot only responds when explicitly @mentioned. If false, responds to all messages. | false |
discord.requireMentionChannelIds | array | Require Mention Channel IDs Channels (or thread parent channels) where a direct bot mention is always required. | [] |
discord.sanitizeReplies | boolean | Sanitize Replies Strip leaked agent reasoning (Thought / Action / Observation / Final Answer) from an answer before posting it, and retry an answer that was only reasoning or empty: the text pass then runs up to 1 + Retries on a non-answer times per message, even for a pipeline that is silent on purpose. It also suppresses answers that open like an error (Error:, ValueError:, a bare Error code: 404); engine and provider errors (an LLM error, a traceback, Error code: 429 - {...}) are never posted, whether or not this is on. | false |
discord.sendResponses | boolean | Send Responses If true, the bot sends pipeline answers back to Discord. If false, only processes messages. | true |
discord.showTyping | boolean | Show Typing Indicator If true, show a typing indicator while processing the pipeline. | true |
discord.teamMentionAlias | string | Team Mention Alias Literal team name the pipeline writes when it hands a question over, for example "@RocketRide team". Every occurrence is replaced with a real mention of the first role in Allowed Mention Role IDs, so the team is actually pinged. Any user who gets the model to write it triggers that ping, so each user gets at most one ping per hour (reset on restart); later answers to that user keep the alias as plain text and cannot ping any allowed role. While it is set, every allowed role pings only from the answer itself and shares that hourly limit. Empty leaves answers and role pings as they are. | "" |
discord.textAttachmentExtensions | array | Text Attachment Extensions Filename extensions decoded as text (UTF-8, or UTF-16 when the file starts with a UTF-16 byte order mark) and routed through the text lane, for example .pipe, .json, .log, .md, .txt, .csv, .yaml, .yml. Once any extension is listed, text/* files are decoded too. Empty (the default): every attachment is routed as a binary object. | [] |
discord.textAttachmentMaxChars | number | Text Attachment Max Characters Maximum decoded characters folded into the text lane per attachment. 0 means no limit. | 12000 |
discord.threadAutoArchiveMinutes | number | Thread Auto Archive Minutes Discord auto-archive duration, in minutes, for response threads the node creates. Discord accepts only 60, 1440, 4320 or 10080; 0 (the default) uses the channel's own default. | 0 |
discord.threadHistoryLimit | number | Thread History Limit Prior thread messages fetched as conversation context for a message in a thread, at most 100. Zero disables it. | 0 |
discord.threadHistoryMaxChars | number | Thread History Max Characters Maximum characters of thread transcript passed as context, at most 20000; the oldest lines are dropped first. Zero disables the context, like Thread History Limit. | 6000 |
discord.threadName | string | Thread Name Name template for response threads. {content} is replaced with the triggering message text. | "Pipeline Response" |
discord.threadNameMaxLength | number | Thread Name Max Length Maximum number of characters in a resolved response thread name. Discord accepts 1 to 100. | 90 |
Dependencies
discord.py