Discord + Better-Notify
Post typed messages to Discord channels via webhooks. Rich embeds, attachments, and custom bot identity — all driven by your notification catalog.
Install
npm install @betternotify/discordQuick start
import { createClient } from '@betternotify/core';
import { discordTransport } from '@betternotify/discord';
const mail = createClient({
catalog,
transportsByChannel: {
discord: discordTransport({
webhookUrl: process.env.DISCORD_WEBHOOK_URL,
}),
},
});
await mail.alert.send({
to: 'webhook',
input: { level: 'critical', message: 'Database latency spike' },
});Features
- Discord Webhook API
- Rich embeds with fields
- File attachments
- Custom username and avatar
- Rate limit handling