A simple JavaScript module used for POST requests to a Discord channel.
The Module Dependencies used:
request
- A simplified HTTP client.
In order to run webhook.js, you will need to have npm
and node
installed. These are instructions on how to obtain and get application ready:
# Clone this repository
git clone https://github.com/Ciaxur/webhook.js
# Install dependencies
npm install
# Build the App
npm build
Note: As of the current version of this module, you will need to hard-code in multiple variables for the Webhook to post.
Simple npm commands to run the application easier:
# Install Required Modules
npm install
# Build src Files
npm run build
# Testing (Using Jest)
npm test
Javascript class mini-documentation:
// Webhook Class Initation Requirements
const webhook = new Webhook(url, username, msg, avatar_url, ttl);
// Initiating the Webhook Request
webhook.initRequest();
More information about the Webhook Class
can be found in the Documentation file.
More information about the JSON Form
for excecuting can be found in Discord's Webhook Documentation.
If you are willing to contribute to the project, please make sure to check out the available links below.
Licensed under the MIT License.