Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
/ webhook.space Public archive

Simplified webhook thing for botlist.space

Notifications You must be signed in to change notification settings

BLU-Shack/webhook.space

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhook.Space

A random webhook thing.

Some code is referenced from dbl-api's source code

const Space = require('webhook.space');

// options.port (?number) => The port to listen for.
// options.path (?string) => The path/endpoint to watch for POSTs.
// options.token (?string) => The bot/guild's API token to validate an upvote.
const Webhook = new Space.Webhook({ port: 1234, path: '/', token: null });

 // Deactivate/reactivate the webhook.
Webhook.close().open();

 // The upvote event.
Webhook.on('upvote', (body, headers) => {
    // Do something with the body and/or headers.
});

About

Simplified webhook thing for botlist.space

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published