Skip to content
a package to handle posting your discord bot stats to botlists [JavaScript - maintained by @T0TProduction]
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Sep 15, 2018
.editorconfig chore(ide): Add IDE settings files Sep 6, 2018
.eslintrc.json
.gitattributes Initial commit Aug 1, 2018
.gitignore fix blapi.handle Dec 30, 2018
.jsbeautifyrc chore(ide): Add IDE settings files Sep 6, 2018
AUTHORS Update AUTHORS Mar 9, 2019
CODE_OF_CONDUCT.md Minor Improvements (#3) Aug 8, 2018
LICENSE Initial commit Aug 1, 2018
README.md ls.terminal.ink has been renamed to discordapps.dev (#32) Apr 18, 2019
blapi.js first changes, completely untested Jul 15, 2019
bttps.js first changes, completely untested Jul 15, 2019
fallbackListData.json Update fallback from botblock.org/api/lists?filter=true (#33) May 21, 2019
package-lock.json Bump lodash from 4.17.11 to 4.17.14 (#36) Jul 15, 2019
package.json Update package.json Jul 26, 2019
yarn.lock Bump lodash from 4.17.11 to 4.17.14 (#36) Jul 15, 2019

README.md

BLAPI - the BotListAPI

Codacy Badge DeepScan grade dependencies Status npm downloads install size jsDelivr

nodei

BLAPI is a package to handle posting your discord bot stats to botlists.

It's intended to be used with discord.js, though you can also manually post your stats.

BLAPI fully supports external and discord.js internal sharding with and without the use of the BotBlock API.

Installation

NPM (recommended)

npm i blapi

Yarn

yarn add blapi

Usage

The list of all supported bot lists and their respective names for the apiKeys object are listed below

With discord.js

const Discord = require("discord.js");
const blapi = require("blapi");

let bot = new Discord.Client({ autoReconnect: true });

// Post to the APIs every 60 minutes; you can leave out the repeat delay as it defaults to 30
// If the interval is below 3 minutes BLAPI will not use the BotBlock API because of ratelimits
blapi.handle(bot, apiKeys, 60);

Manually, without need of Discord libraries

// If you want to post sharddata you can add the optional parameters
// shardID and shardCount should both be integers
// shardsArray should be an integer array containing the guildcounts of the respective shards
blapi.manualPost(guildCount, botID, apiKeys[, shardID, shardCount[, shardsArray]]);

Turn on extended logging

// Use this to get more detailed logging when posting
// Errors will always be logged
blapi.setLogging(true);

Turn off the use of the BotBlock API

// Use this to turn off BotBlock usage
// By default it is set to true
blapi.setBotblock(false);

apiKeys

The JSON object which includes all the API keys should look like this:

{
  "bot list domain": "API key for that bot list",
  "bot list domain": "API key for that bot list",
  "bot list domain": "API key for that bot list"
}

an example would be:

{
  "bots.ondiscord.xyz": "dsag38_auth_token_fda6gs",
  "discordbots.group": "qos56a_auth_token_gfd8g6"
}

Lists

These lists are supported by being hardcoded, but BLAPI will look for new additions on startup via the BotBlock API. BLAPI will try to update its API data daily.

Domain Supports guild count Supports sharding Is not extremely annoying
botlist.space ✔️ ✔️ ✔️
botsfordiscord.com ✔️ ✔️
bots.ondiscord.xyz ✔️ ✔️
discord.boats ✔️ ✔️
discordapps.dev ✔️ ✔️
discordboats.club ✔️ ✔️
discordbotindex.com ✔️ ✔️
discordbots.org ✔️ ✔️
discordbotlist.com ✔️ ✔️ ✔️
discordbotlist.xyz ✔️ ✔️
discordbotreviews.xyz ✔️ ✔️
discordbot.world ✔️ ✔️ ✔️
discord.bots.gg ✔️ ✔️ ✔️
discordbotslist.com ✔️ ✔️
discordbots.group ✔️ ✔️
discord.services ✔️ ✔️
discordsbestbots.xyz ✔️ ✔️ ✔️
discordsextremelist.tk ✔️ ✔️
divinediscordbots.com ✔️ ✔️ ✔️

Discordbots.org is still supported even though they blacklisted our API fetching service of choice, BotBlock.

If at any time you find other bot lists have added an API to post your guildcount, let us know on this repo or by contacting T0TProduction#0001 on Discord.

Credit

All the people who helped making BLAPI are listed in AUTHORS

By default we use the BotBlock API to fetch and post.

You can’t perform that action at this time.