@signalbox/discord
v0.3.1
Published
signalbox plugin: send messages to Discord via a webhook
Downloads
196
Readme
@signalbox/discord
signalbox plugin: send messages to Discord via a channel webhook.
Part of signalbox — see the full documentation.
Install
npm install @signalbox/discordUsage
import { discordPlugin } from "@signalbox/discord"
const plugins = {
discord: discordPlugin({
webhookUrl, // a Discord channel webhook URL
username: "my-bot", // optional default display name
}),
}
// in a workflow:
await ctx.plugins.discord.send({ content: "deploy finished ✅" })send(message) posts to the configured webhook, retrying on HTTP 429 rate limits (up to maxRetries, default 3) and throwing on other failures. A message may set its own username to override the default.
For a full gateway bot (slash commands, DMs) see @signalbox/discord-bot.
License
MIT
