Skip to content
A simple Javascript file for nicely formatting Discord webhooks
Branch: master
Clone or download

Latest commit

Latest commit 35266c4 Apr 23, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Rename inline prop to short prop to comply with slack api Apr 23, 2020
.eslintrc.json ESLint & Add name verification May 8, 2018
.gitignore Add doc builder GitHub Action Apr 23, 2020 i want the github insights page to be more green Dec 1, 2018
LICENSE Update copyright year Jul 12, 2019 Readme updates Apr 23, 2020
package-lock.json 3.7.3 Apr 23, 2020
package.json 3.7.3 Apr 23, 2020

Discord Webhooks

version npm

A simple Javascript file for nicely formatting Discord webhooks

See the full documentation at


It's simple

To initialise:

const webhook = require("webhook-discord")

const Hook = new webhook.Webhook("WEBHOOK URL")


To send an info message:"WEBHOOK NAME","Info")

To send a warning message:

Hook.warn("WEBHOOK NAME", "Warning message")

To send an error message:

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

To send a success message:

Hook.success("WEBHOOK NAME","Yay we did something right")

Custom messages

To send custom messages, you should make use of the MessageBuilder.

See all the options on the documentation

const webhook = require("webhook-discord");

const Hook = new webhook.Webhook("WEBHOOK URL");

const msg = new webhook.MessageBuilder()
                .setText("This is my webhook!");


Either use npm:

npm install webhook-discord

Or clone from source:

git clone



You can’t perform that action at this time.