
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
discord-webhooks-node
Advanced tools
[](https://img.shields.io/npm/dw/discord-webhooks-node) [](https://img.shields.io/github/license/gaurishhs/di
npm install discord-webhooks-node
import { Webhook } from 'discord-webhooks-node';
const webhook = new Webhook({
url: 'WEBHOOK_URL',
});
webhook.execute({
content: 'Hello world!',
}).then(() => console.log('Sent!')).catch((err) => console.error('Failed! ', err));
import { Webhook } from 'discord-webhooks-node';
const webhook = new Webhook({
url: 'WEBHOOK_URL',
});
webhook.execute({
content: 'Hello world!',
files: [
{
name: 'test.txt',
file: Buffer.from('Hello world!'),
},
],
}).then(() => console.log('Sent!')).catch((err) => console.error('Failed! ', err));
As an embed attachment:
import { readFileSync } from 'fs';
import { Embed, Webhook } from 'discord-webhooks-node';
const webhook = new Webhook({
url: 'WEBHOOK_URL',
});
webhook.execute({
content: 'Hello world!',
embeds: [new Embed().setTitle('Hello world!').setDescription('This is a test embed.').setImage('attachment://test.jpeg').toJSON()],
files: [
{
name: 'test.jpeg',
// Read test.jpeg from the current directory
file: readFileSync(__dirname + '/test.jpeg'),
},
],
}).then(() => console.log('Sent!')).catch((err) => console.error('Failed! ', err));
import { readFileSync } from 'fs';
import { Button, Embed, MessageBuilder, Webhook } from '../src';
const webhook = new Webhook({
url: 'WEBHOOK_URL',
});
const msg = new MessageBuilder('Hello World!')
.addEmbed(
new Embed()
.setTitle('Hello World!')
.setDescription('This is a test embed!')
.setColor('#ff0000')
.setFooter('https://discord.com', 'This is a test footer!')
.setTimestamp()
.setThumbnail('https://cdn.discordapp.com/embed/avatars/0.png')
.setAuthor('Test Author', 'https://discord.com', 'https://cdn.discordapp.com/embed/avatars/0.png')
.addField('Test Field', 'This is a test field!', false)
)
.addComponent(new Button().setLabel('Test Button').setStyle(1).setURL('https://discord.com'));
webhook.execute(msg.toJSON()).then(() => console.log('Sent!')).catch((err) => console.error('Failed! ', err));
import { Webhook } from 'discord-webhooks-node';
const webhook = new Webhook({
url: 'WEBHOOK_URL',
})
webhook.setUsername('Test User');
webhook.setAvatar('https://cdn.discordapp.com/embed/avatars/0.png');
FAQs
[](https://img.shields.io/npm/dw/discord-webhooks-node) [](https://img.shields.io/github/license/gaurishhs/di
The npm package discord-webhooks-node receives a total of 8 weekly downloads. As such, discord-webhooks-node popularity was classified as not popular.
We found that discord-webhooks-node demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.