discordbots.co
v1.1.0
Published
Feature-rich yet lightweight API wrapper for discordbots.co
Downloads
6
Readme
discordbots.co
Feature-rich yet lightweight API wrapper for discordbots.co.
Installation
Node.js LTS or newer is required.
npm install discordbots.co
Usage
const { Client } = require('discord.js');
const client = new Client();
const { APIClient } = require('discordbots.co');
const apiClient = new APIClient('API key', client.user.id);
// Post server and shard count to the website
client.on('ready', async () => {
const serverCount = client.guilds.cache.size;
await apiClient.post(serverCount);
});
client.login('CLIENT TOKEN');
// Get bot's information
apiClient.getBot().then(console.log).catch(console.error);