webhookmgr

1.3.7-1 • Public • Published

WebHook-Manager, create y gestiona tu propio webhook

  • Instalación: npm i webhookmgr
  • Ejemplos:

    Ejemplo 1:
    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)
    })
    

    Ejemplo 2
    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)
    })
    

  • Clases:

    webhook(message, username, avatar)
    /*
    message: message
    username: String
    avatar: URL
    */
    new webhook(message, username, avatar)
    

    sendWebhook(webhook, message, true)
    /*
    webhook: Webhook
    message: MessageToSay<String>
    true: AutoDelete<Boolean>
    */
    await sendWebhook(webhook, message, true)
    

    fetchWebhookBy()
    // 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})
    

  • Discord:
    require("webhookmgr").discord
  • Readme

    Keywords

    none

    Package Sidebar

    Install

    npm i webhookmgr

    Weekly Downloads

    3

    Version

    1.3.7-1

    License

    ISC

    Unpacked Size

    4.55 kB

    Total Files

    7

    Last publish

    Collaborators

    • sepoxcraft48