Skip to content

Simple Webhook Module used for POST requests to Discord using Typescript

License

Notifications You must be signed in to change notification settings

Ciaxur/webhook.js

Repository files navigation

webhook.js

Travis Build Status License

A simple JavaScript module used for POST requests to a Discord channel.

The Module Dependencies used:

  • request - A simplified HTTP client.

How To Use

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.

npm Commands

Simple npm commands to run the application easier:

# Install Required Modules
npm install

# Build src Files
npm run build

# Testing (Using Jest)
npm test

Webhook Class

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.


Contribution

If you are willing to contribute to the project, please make sure to check out the available links below.


License

Licensed under the MIT License.

About

Simple Webhook Module used for POST requests to Discord using Typescript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published