Guides
Bot Bridge
Configure the bot-side bridge, choose intents carefully, and keep the exposed transport surface deliberate.
The bot bridge is where Discord runtime concerns live.
Minimum configuration
import { createBotBridge } from 'shardwire';
const bridge = createBotBridge({
token: process.env.DISCORD_TOKEN!,
intents: ['Guilds', 'GuildMessages', 'GuildMembers', 'GuildVoiceStates'],
server: {
port: 3001,
path: '/shardwire',
secrets: [process.env.SHARDWIRE_SECRET!],
},
});What to tune on the server block
hostwhen binding a specific interfacepathwhen the bridge should not live at the default pathheartbeatMsfor transport liveness behaviormaxConnectionsif you need to cap connected appsmaxConcurrentActionsandactionQueueTimeoutMswhen action execution pressure mattersidempotencyScopeandidempotencyTtlMswhen retries matter
Intent discipline
Only declare the intents you actually need. Missing intents silently shrink what events the bridge can ever negotiate, so they directly affect downstream app behavior.
Voice features specifically require GuildVoiceStates for voiceStateUpdate negotiation.
Use diagnostics and strict startup to catch that mismatch early instead of discovering it from “missing events” in production.