Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mertssmnoglu/discord-hooks
Basic Discord WebHooks
https://github.com/mertssmnoglu/discord-hooks
discord discord-hook discord-hooks discord-webhook discord-webhook-api discord-webhooks
Last synced: about 2 months ago
JSON representation
Basic Discord WebHooks
- Host: GitHub
- URL: https://github.com/mertssmnoglu/discord-hooks
- Owner: mertssmnoglu
- License: mit
- Created: 2022-07-08T07:26:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-16T21:27:19.000Z (11 months ago)
- Last Synced: 2024-11-08T06:49:46.592Z (2 months ago)
- Topics: discord, discord-hook, discord-hooks, discord-webhook, discord-webhook-api, discord-webhooks
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/discord-hooks
- Size: 65.4 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# About
Basic discord webhook library. Allows you to send messages, embeds to discord with webhooks.
# Installation
```bash
npm install discord-hooks
```# Import
Import the discord-hooks module to your project.
```js
import Webhook from "discord-hooks";
```# Commands
- ### send(username, avatarUrl, content, embed)
```js
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()
```js
const webhook = new Webhook("YOUR WEBHOOK URL")
webhook.destroy().then(console.log("Webhook Destroyed!"));
```