New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

webhooks-discord

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webhooks-discord

> Send High Quality Embedded Webhooks To Your Discord Server

latest
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

Webhooks Discord

Send High Quality Embedded Webhooks To Your Discord Server

Usage

To Initialize

const Webhook = require("discord-webhook")
const Hook = new Webhook("WEBHOOK URL")

Info Format Webhook

Hook.Info("WEBHOOK NAME","Info")

Warn Format Webhook

Hook.Warn("WEBHOOK NAME", "Warning")

Error Format Webhook

Hook.Err("WEBHOOK NAME","Error")

Success Format Webhook

Hook.Success("WEBHOOK NAME","Success Webhook!")

Custom Format Webhook

Hook.Custom("WEBHOOK NAME","MESSAGE CONTENT","MESSAGE TITLE","MESSAGE COLOUR HEX (Optional)")

Custom Format Webhook With Image

Hook.Image("WEBHOOK NAME","MESSAGE CONTENT","MESSAGE TITLE", "IMAGE URL")

Announcement Format Webhook

Hook.Announcement("WEBHOOK NAME","Announcement Content")

Example Ready Event Discord.JS Handlers (Based On One File)

const Discord = require('discord.js')
const client = new Discord.Client(); // You Can Attatch Client Settings There
const Webhook = require('discord-webhook');
const Hook = new Webhook("WEBHOOK URL")

client.on('ready', () => 
console.log("[READY]", `Logged In As ${client.user.username}!`);
Hook.Info("Ready Event", `Logged In As ${client.user.username}!`);
}

FAQs

Package last updated on 23 Jun 2018

Did you know?

Socket

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.

Install

Related posts