1.1.6 • Published 3 years ago
fast-webhook v1.1.6
Fast webhook
Support Discord: https://discord.com/invite/7BeDqdRFtE
This package creates an easy way to send webhooks, as well as providing fallbacks if the client does not have the proper permissions.
If the client does not have the permission Manage Webhooks
, it will send a normal message instead, causing no issues and working seamlessly
const send = require('fast-webhook');
Documentation
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
channel | textChannel | false | none | The channel to send the webhook to |
message | string or embed | false | none | The message or embed to send |
options | object | true | none | The options for the webhook |
options.name | string | true | Server Invite | The title of the webhook |
options.icon | iconURL | true | Webhook Icon | The icon of the webhook |
options.mentions | boolean | true | True | If false webhook will don't ping anyone. |
Examples
const send = require('fast-webhook');
send(message.channel, 'Current Settings...', {
name: 'Settings',
icon: 'https://i.imgur.com/X9eAmHm.png'
})
const send = require('fast-webhook');
const { MessageEmbed } = require('discord.js');
const embed = new MessageEmbed()
.setColor("#77C2AE")
.setTitle(`California`)
.setDescription(`**By *Clayton James***`)
.setFooter(`Just a normal embed!`);
send(message.channel, embed, {
name: 'Now Playing',
icon: 'https://i.imgur.com/44YTwve.png'
})
© TrueXPixels 2018 || Edited by DomeQ#0001