3.3.1 • Published 4 years ago
botlist.space v3.3.1
botlist.space API
A simple library for connecting with the botlist.space API.
Getting Started
Simply install by navigating to your project directory then running npm i botlist.space
.
API Example
const BotList = require('botlist.space');
const client = new BotList.Client({ id: '12345678900000000', botToken: 'xxx' });
client.getStatistics().then((stats) => /* ... */).catch((error) => /* ... */);
client.getAllBots().then((bots) => /* ... */).catch((error) => /* ... */);
client.getBot('12345678900000001').then((bot) => /* ... */).catch((error) => /* ... */);
client.getUpvotes().then((upvotes) => /* ... */).catch((error) => /* ... */);
client.hasUpvoted('12345678900000002').then((hasUpvoted) => /* ... */).catch((error) => /* ... */);
client.getSelfBot().then((bot) => /* ... */).catch((error) => /* ... */);
client.postServerCount(12345).then((bot) => /* ... */).catch((error) => /* ... */); // Server count
client.postServerCount([ 1250, 1250, 1250 ]).then((bot) => /* ... */).catch((error) => /* ... */); // Shards
client.getUser('12345678900000002').then((user) => /* ... */).catch((error) => /* ... */);
client.getUserBots('12345678900000002').then((bots) => /* ... */).catch((error) => /* ... */);
WebSocket Example
const BotList = require('botlist.space');
const client = new BotList.WebSocket({ tokens: [ 'xxx', 'xxx', 'xxx' ], reconnect: true });
client.on('connected', () => {
console.log('Successfully connected to the botlist.space gateway');
});
client.on('view', (event) => {
console.log('Someone has viewed one of my bots: ' + event.bot.username);
});
client.on('invite', (event) => {
console.log('Someone has invited one of my bots: ' + event.bot.username);
});
client.on('upvote', (event) => {
console.log(event.user.username + 'has upvoted one of my bots: ' + event.bot.username);
});
client.on('close', (event) => {
console.log('The gateway was closed', event);
});
Documentation
https://botlist-space.github.io/api/
API Documentation
License
3.3.1
4 years ago
3.3.0
5 years ago
3.2.2
5 years ago
3.2.1
5 years ago
3.2.0
5 years ago
3.1.6
5 years ago
3.1.5
5 years ago
3.1.0
5 years ago
3.0.5
5 years ago
3.0.4
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.1.8
5 years ago
2.1.7
5 years ago
2.1.6
5 years ago
2.1.5
6 years ago
2.1.4
6 years ago
2.1.3
6 years ago
2.1.2
6 years ago
2.1.1
6 years ago
2.1.0
6 years ago
1.1.0
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.5
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago