This package is a fork of paperclip-plugin-discord by @mvanhorn (MIT). All of the original work — Gateway handling, intelligence signal extraction, tridaily digest, HITL escalation, ACP thread spawning, slash commands, media pipeline, workflow engine — is preserved. This fork only adds functionality; it does not rewrite or remove upstream behavior.
-
DIRECT_MESSAGESgateway intent — upstream only subscribed toGUILDS | GUILD_MESSAGES | MESSAGE_CONTENT, so bots could not receive DMs. This fork adds theDIRECT_MESSAGES(value 4096) intent whenenableDirectMessagesis on. -
Free-form @mention routing — upstream's
handleMessageCreateonly processed replies to prior bot notifications. This fork, whenenableFreeFormMentionsis on, also routes any channel message where the bot is @mentioned to an agent invoke. The upstream reply-to-notification path is preserved unchanged. -
Serialized per-context message queue (new file:
src/message-queue.ts) — one agent run in flight per(guild_id, channel_id). Additional inbound messages are queued and processed in order after the prior run completes. Burst traffic gets deterministic FIFO ordering instead of coalescing or parallelism. -
DiscordConfigextensions — new optional fieldsenableFreeFormMentions,enableDirectMessages,mentionAgentId,dmAgentId,mentionCompanyId,messageQueueMaxDepth,messageQueueStaleSeconds. All defaults preserve upstream behavior. -
Downtime mention backfill (new file:
src/mention-backfill.ts) — on plugin activation, sweep channels for @mentions missed while the bot was offline. Strict detection: only treats a mention as addressed if there's amessage_reference-linked bot reply after it. Bounded lookback viabackfillMaxHours(default 24h). Two-layer dedup (per-channel watermark + global processed-set).
See UPSTREAM_DIFF.md for the exact line-by-line diff intended for the upstream pull request.
We intend to file a pull request against @mvanhorn's repo proposing these additions. If accepted, this fork will be deprecated in favor of upstream. If not, it stays maintained here.
File any issues here first: https://github.com/devli13/paperclip-plugin-discord/issues. Upstream-relevant issues will be forwarded.
@paperclipai/plugin-sdk(peer) — Paperclip plugin runtime.@paperclipai/shared(peer).
See @devli13/mcp-discord — a standalone MCP server for Discord REST operations. Works with Claude Code, Gemini CLI, and Paperclip agents.
MIT — same as upstream. See LICENSE.