Discord
Target format
Section titled “Target format”discord://<webhook-id>:<webhook-token>@webhookimport { send } from 'statocysts'
await send( 'discord://123456789012345678:WEBHOOK_TOKEN@webhook', { title: 'Deployment complete', body: 'Production is healthy.' },)The webhook ID is URL username and the token is URL password.
Query parameters
Section titled “Query parameters”| Parameter | Description |
|---|---|
username |
Override the webhook display name. |
avatar_url |
Override the webhook avatar URL. |
wait |
Add wait=true to Discord’s request when truthy. false, 0, and an empty value are false. |
discord://123456789012345678:WEBHOOK_TOKEN@webhook?username=Operations&wait=trueMessage format
Section titled “Message format”A title-only notification becomes plain content. With a body, the content is formatted as a Markdown level-two heading followed by the body.
Provider options
Section titled “Provider options”Direct discord.send() calls accept fetchOptions:
import { discord } from 'statocysts'
await discord.send(target, notification, { fetchOptions: { timeout: 5000 },})