0.0.5 • Published 6 years ago

webhooks-discord v0.0.5

Weekly downloads
5
License
-
Repository
-
Last release
6 years ago

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}!`);
}
0.0.5

6 years ago

0.0.4

6 years ago