webhookmgr
v1.3.7-1
Published
<h3><a href="#">WebHook-Manager</a>, create y gestiona tu propio webhook
Downloads
38
Readme
let { webhook: wh, sendWebhook: sw } = require("webhookmgr")
/*
message: message
message.author.username: String
message.author.displayAvatarURL(): (opcional) URL
*/
new wh(message, message.author.username, message.author.displayAvatarURL()).then(async webhook => {
/*
"Hola": String
webhook: webhook
true: Boolean (autodelete webhook)
*/
await sw(webhook, "Hola", true)
})
let whmgr = require("webhookmgr")
/*
message: message
message.author.username: String
message.author.displayAvatarURL(): (opcional) URL
*/
new whmgr.webhook(message, message.author.username, message.author.displayAvatarURL()).then(async webhook => {
/*
"Hola": string
webhook: webhook
false: Boolean (autodelete webhook)
*/
await whmgr.sendWebhook(webhook, "Hola", false)
})
/*
message: message
username: String
avatar: URL
*/
new webhook(message, username, avatar)
/*
webhook: Webhook
message: MessageToSay<String>
true: AutoDelete<Boolean>
*/
await sendWebhook(webhook, message, true)
// Via ID
/*
guild: Guild
id: WebhookID<Integer>
*/
await fetchWebhookBy(guild, {id: id})
// Via Name
/*
guild: Guild
name: WebhookName<String>
*/
await fetchWebhookBy(guild, {name: name})
// Via URL
/*
guild: Guild
url: WebhookURL<Link>
*/
await fetchWebhookBy(guild, {url: url})
// Via token
/*
guild: Guild
token: WebhookToken
*/
await fetchWebhookBy(guild, {token: token})
require("webhookmgr").discord