Registry / devops / netlify-plugin-discord

netlify-plugin-discord

JSON →
library0.0.2jsnpmunverified

netlify-plugin-discord is a Netlify Build plugin designed to send automated build notifications to a Discord channel via webhooks. As of its initial release (v0.0.2), it offers a straightforward way to keep development teams informed about build statuses (success, failure, etc.) directly within Discord. Its release cadence is currently unknown given its early stage. The plugin differentiates itself by providing a simple, opinionated integration specifically for Netlify's build ecosystem, contrasting with more generic webhook solutions or custom scripting that would require more setup. It focuses solely on Discord notifications, making it a targeted utility for Netlify users who utilize Discord for team communication.

npm install netlify-plugin-discord
INSTALL
IMPORT
SIG · NETLIFY-PLUGIN-DIS
N
netlify-plugin-discord
devopsjavascriptv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart configures the netlify-plugin-discord in your netlify.toml and sets the required Discord webhook URL as an environment variable, enabling build notifications.

{ "netlify.toml": """ [[plugins]] package = "netlify-plugin-discord" [build] # Example build settings command = "npm run build" publish = "dist" """, "environment_variable": "DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN" }
Debug
Known issues
gotchaThe plugin requires the DISCORD_WEBHOOK_URL environment variable to be correctly set in Netlify. Without it, notifications will not be sent, and the plugin may fail silently or with a generic error during the build process.
fix
Ensure DISCORD_WEBHOOK_URL is configured in your Netlify site settings under 'Build & deploy' -> 'Environment variables' with a valid Discord webhook URL.
affects: >=0.0.1
gotchaDiscord webhook URLs are sensitive. Ensure they are stored securely as environment variables and not committed directly into your repository. Public exposure of webhooks can lead to abuse.
fix
Always use Netlify's environment variable management for DISCORD_WEBHOOK_URL. Do not hardcode it in netlify.toml or any source files.
affects: >=0.0.1
gotchaAs an early-stage plugin (v0.0.2), its long-term maintenance and future breaking changes are not yet established. Be prepared for potential changes in configuration or behavior in future major releases.
fix
Monitor the plugin's GitHub repository for updates and release notes, especially before upgrading to new major versions.
affects: <1.0.0
Errors
Common errors & fixes
Discord notifications not appearing in channel.
DISCORD_WEBHOOK_URL is either missing, incorrect, or the Discord channel permissions are misconfigured.
fix
Verify the DISCORD_WEBHOOK_URL in Netlify's environment variables. Test the webhook URL directly (e.g., using `curl -H "Content-Type: application/json" -d '{"content": "Test message"}' YOUR_WEBHOOK_URL`) and ensure the Discord channel allows messages from webhooks.
Build fails with 'Plugin "netlify-plugin-discord" failed' or similar generic error.
Could be an internal plugin error, an invalid webhook URL causing a fetch error, or network issues.
fix
Check Netlify build logs for more specific error messages. Ensure the `DISCORD_WEBHOOK_URL` is correct and accessible. Temporarily disable the plugin to confirm it's the source of the build failure.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
netlify-plugin-discord — npm install netlify-plugin-discord · libregistry