
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
discordchan
Advanced tools
Lightweight utility for posting messages or JSON payloads to a Discord channel via webhook, with optional dry-run mode for testing.
Canonical URL:
https://alexstevovich.com/a/discordchan-nodejs
Software URL:
https://midnightcitylights.com/software/discordchan-nodejs
A lightweight utility for sending messages or JSON payloads to Discord channels through webhook URLs.
Includes a dry-run mode for local testing without sending any real requests.
npm install discordchan
import DiscordChan from 'discordchan';
const chan = new DiscordChan('https://discord.com/api/webhooks/...');
// Send a simple message
await chan.send('Hello from DiscordChan!');
// Send a JSON object (auto-formatted as code block)
await chan.send({ status: 'OK', uptime: 4823 });
// Use dry-run mode to simulate messages without posting
chan.dryRunMode(true);
await chan.send('This will only log locally.');
new DiscordChan(webhook, options?)| Parameter | Type | Description |
|---|---|---|
webhook | string | Discord webhook URL. |
options | object | Optional settings. |
options.dryRun | boolean | If true, logs messages instead of sending. |
dryRunMode(enable = true)Enables or disables dry-run simulation.
send(content)Sends either a string or an object as a message.
If the content is an object, it is automatically formatted as a JSON code block.
verify()Returns true if a valid webhook URL is set.
ensure()Throws an error if the webhook URL is invalid.
Licensed under the Apache License 2.0.
FAQs
Lightweight utility for posting messages or JSON payloads to a Discord channel via webhook, with optional dry-run mode for testing.
We found that discordchan demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.