discord-webhook-client
v0.0.1
Published
A Simple wrapper around Discord Webhook endpoints.
Downloads
101
Maintainers
Readme
Discord-Webhook-Client
A Simple wrapper around Discord Webhook endpoints.
Table of Contents
Example Usage
const { Webhook } = require("discord-webhook-client");
// import { Webhook } from "discord-webhook-client";
const webhook = new Webhook(
{
url: "webhook-url"
});
/*
or new Webhook(
{
id: "webhook-id",
token: "webhook-token
})
*/
webhook.send("message");
webhook.send({
embed: {
// ...embed data
}
})
webhook.send(
new Embed().setTitle("Test Embed!") //... and other embed builder methods
);
webhook.editMessage("msg_id", "new content");
About
This project is simply a very minimalistic wrapper over the Discord Webhook API. The intention is not to cache anything and to make this webhook client as minimalistic as possible. It is written in TypeScript for included typings.
Installation
You are expected to have a reasonably up-to-date Node.js version. The library is only testing on the LTS version of Node.js as of this date (currently Node v14).
Install using NPM
npm install discord-webhook-client
Documentation
Documentation is avaliable here
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please ensure your commits pass the tests, lints, and builds. This means you should test it locally before pushing.
LICENSING
discord-webhook-client © zaida04, Released under the MIT License.