@sandbox.js/discord-hooks

0.0.2 • Public • Published

Discord Hooks

Basic Discord Hooks

npm version npm downloads

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

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"
        }
    }
]
)
const webhook = new Webhook("YOUR WEBHOOK URL")
webhook.destroy().then(console.log("Webhook Destroyed!"));

Package Sidebar

Install

npm i @sandbox.js/discord-hooks

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

8.46 kB

Total Files

9

Last publish

Collaborators

  • freeutka