Discord
Dispatch verified Discord interactions and messages to persistent agents.
Use the adapter from @fabric-harness/channels/discord. Scaffold it with:
fh add channel discordimport { createDiscordChannel } from '@fabric-harness/channels/discord';
export default createDiscordChannel({
applicationId: process.env.DISCORD_APPLICATION_ID!,
publicKey: process.env.DISCORD_PUBLIC_KEY!,
agent: 'assistant',
});Mount the generated route as POST /channels/discord/interactions. The adapter verifies Discord's
Ed25519 signature over the timestamp and exact body, answers interaction pings, deduplicates by
interaction ID, uses the guild as tenant, records the Discord user as onBehalfOf, and keys the
persistent instance by application/guild/channel/thread.
Bind replyInDiscord(ref, { botToken }) as a write-effect tool for outbound messages. Keep
moderation actions in separate approval-gated tools.
Configure the Discord interaction URL to /channels/discord/interactions and validate OAuth scopes
and the production bot installation before rollout.