1.8.7 • Published 2 years ago

discord-webhook-lib v1.8.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

discord-webhook-lib

discord-webhook-lib is a discord webhook library that allows you to send webhooks.

This library supports Javascript and Typescript.

Format

const w = new WebhookClient({
    id: "12345678789",
    token: "token",
    username: "", // optional
    avatar_url: "" // optional
})

const embed = new Embed()
    .setTitle('Cool Embed')
    .setDescription('Very nice')
    .setFooter({
        text: "Made by Vultrex Dev'"
    }) 

w.send('Hello', embed)

Embeds

const embed = new Embed()
.setTitle('Cool Embed')
.setDescription('Very nice')
.setFooter('Made by Vultrex Dev')

webhookclient.send('Super cool message', embed)

Messages

webhookclient.send('Hello')

Install

npm i discord-webhook-lib
yarn add discord-webhook-lib