easy-discord-webhook
v1.0.4
Published
Use discord webhooks easily
Downloads
8
Readme
Easy Discord Webhook
You can use this module for your discord bot (with discord.js) and use webhooks easily ! If you need help about the module you can send me a message on discord : Tanukii#7115
Installation
$ npm install easy-discord-webhook
Examples
Basic use
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
webhookClient.send({ content:`I Love Cat` });
Embeds
const { MessageEmbed } = require('discord.js')
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
const embed = new MessageEmbed()
.setDescription("Hello there !")
webhookClient.send({ embeds:[embed] });
Send with custom name
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
webhookClient.send({ content:`Look at my new name`, username:"Cutie" });
Send with custom avatar
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
const url = "https://i.imgur.com/yQ3caNv.png"
webhookClient.send({ content:`Look at my new avatar`, avatar_url:url });
Send file
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
const path = "a file path"
webhookClient.sendFile(path);
Send tts
const Webhook = require('easy-discord-webhook');
const webhookClient = new Webhook('YOUR WEBHOOK LINK');
webhookClient.send({ content:`Hello guys !`, tts:true });
License
MIT