Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dbots-pkg/dbothook.js

A webhook receiver for all botlists.
https://github.com/dbots-pkg/dbothook.js

api discord discordapp discordbots webhook webhook-receiver

Last synced: 6 days ago
JSON representation

A webhook receiver for all botlists.

Awesome Lists containing this project

README

        



dbothook.js logo


A webhook receiver for all botlists.



NPM version
NPM downloads
Dependencies
LGTM Code Quality


Linting state
Typings state



NPM info


# Table of Contents
- [About](#about)
- [Installing](#installing)
- [Example](#example)
- [Supported Services](#supported-services)
- [Contribution](#contribution)
- [Other Links](#other-links)

## About
`dbothook` helps [Discord](https://discordapp.com) bot developers recieve webhook events from multiple bot lists. You can create an express application straight from the hook or integrate endpoints into an existing application.

## Installing
You can install dbothook by running this command:
```sh
# Stable
npm i dbothook
yarn add dbothook

# Master
npm i dbots-pkg/dbothook.js#master
yarn add ssh://github.com/dbots-pkg/dbothook.js#master
```

## Example
```js
const DBotHook = require('dbothook');
const hook = new DBotHook({
authSecrets: {
topgg: '…',
discordboats: '…',
discordbotlist: '…',
botsfordiscord: '…'
}
});

hook.listen(5478);
hook.on('called', event => {
// Give them some perks...
});

// This should open endpoints for each bot list
// For example, you can set your webhook URL to "https://some.site/topgg" and start collecting requests.
```

## Supported Services
| Service | Key | Returns `botId`? | Returns `username` & `discriminator`? |
| :-- | :-- | :-: | :-: |
| [Arcane Bot Center](https://arcane-center.xyz/) | `arcanebotcenter` | ✅ | ✅ |
| [Botlist.space](https:/botlist.space/) | `botlistspace` | ✅ | ✅ |
| [Bots For Discord](https://botsfordiscord.com/) | `botsfordiscord` | ✅ | ❌ |
| [Discord Boats](https://discord.boats/) | `discordboats` | ✅* | ✅ |
| [Discord Bot List](https://discordbotlist.com/) | `discordbotlist` | ❌ | ✅ |
| [Glenn Bot List](https://glennbotlist.xyz/) | `glennbotlist` | ✅ | ❌ |
| [List My Bots](https://listmybots.com/) | `listmybots` | ✅ | ❌ |
| [Mythical Bots](https://mythicalbots.xyz/) | `mythicalbots` | ❌ | ❌ |
| [Top.GG](https://top.gg/) | `topgg` | ✅ | ❌ |

*The bot ID from Discord Boats events will be recieved from the URL or the avatar URL in the payload. If your bot has a vanity URL (assuming Discord Boats posts that) and does not have an avatar, the bot ID will be `null`.

## Contribution
Any contribution may be useful for the package! Make sure when making issues or PRs that the issue has not been addressed yet in a past issue/PR.

## Other Links
- [NPM](https://npmjs.org/package/dbothook)
- [Yarn](https://yarn.pm/dbothook)
- [JSDelivr](https://www.jsdelivr.com/package/npm/dbothook)
- [David (Dependency Watcher)](https://david-dm.org/dbots-pkg/dbothook.js)
- [dbots GitHub Organization](https://github.com/dbots-pkg)