Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

discord-hooks

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-hooks

Basic Discord WebHooks

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
7
40%
Maintainers
1
Weekly downloads
 
Created
Source

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 install discord-hooks

Import

Import the discord-hooks module to your project.

import Webhook from "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/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!"));

Keywords

discord

FAQs

Package last updated on 20 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts