Same shape as Slack: the webhook URL carries the destination channel, so one env var is the whole setup.
Setup
The fast way: bunx postboi init --chat, pick Discord, choose Connect in the browser.
Discord’s own consent screen asks which server and channel to post to, and the webhook
lands in your env file without you ever seeing it. Signed in to Postboi, it also syncs to your team, so nobody else sets it up at all.
Or create a webhook yourself under Server Settings → Integrations → Webhooks (or a channel’s own settings), and paste it:
Treat the URL as a secret — anyone holding it can post to your channel. It’s exactly the kind of credential team sync exists for.
Titles
title renders as bold markdown above the message:
Posting to more than one channel
to overrides the webhook per message:
Each gets its own result — one failure never loses the rest.
Development posts for real
Unlike SMS, Discord is not intercepted in development: posting to your own server
while building is usually the point. With no DISCORD_WEBHOOK_URL configured, messages
are captured by the dev inbox (or logged) instead of erroring.
Worth knowing
- Discord caps a message at 2000 characters. Postboi truncates on code points (an emoji never splits into garbage) rather than letting the whole post be rejected — which matters when you’re piping in a stack trace.
- In a multi-channel
send(), the chat leg posts to whichever platformchat.providernames in your config. Your own code just callsdiscord().