1.0.4 • Published 2 years ago

easy-discord-webhook v1.0.4

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

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

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago