discordbots.co
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i discordbots.co

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.67 kB

Total Files

7

Last publish

Collaborators

  • chroventer