0.0.2 • Published 7 months ago

@sandbox.js/discord-hooks v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Basic Discord Hooks

About

Basic discord webhook library. Allows you to send messages, embeds to discord with webhooks.

Installation

npm i @sandbox.js/discord-hooks

Import

Import the discord-hooks module to your project.

import Webhook from "@sandbox.js/discord-hooks";

Commands

  • send(username, avatarUrl, content, embed)

const webhook = new Webhook("YOUR WEBHOOK URL")
webhook.send(
'USERNAME',
'AVATAR_URL',
'This is a test message!',
[
    {
        title: "Discord Hooks",
        url: "https://npmjs.com/package/@sandbox.js/discord-hooks",
        color: "#5865F2",
        description: "Basic discord webhook library. Allows you to send messages, embeds to discord with webhooks.",
        timestamp: new Date(),
        footer: {
            text: "This message sent with discord-hooks.",
            icon_url: "ICON_URL"
        }
    }
]
)
  • destory()

const webhook = new Webhook("YOUR WEBHOOK URL")
webhook.destroy().then(console.log("Webhook Destroyed!"));