3.1.0 • Published 3 years ago

listcord.js v3.1.0

Weekly downloads
19
License
MIT
Repository
github
Last release
3 years ago

Listcord.js

An official wrapper for the listcord api!

View https://listcord.xyz/apidocs to view the raw api documentation!

Installation

npm i listcord.js

Getting started

Get your api token from https://listcord.xyz/me. The Listcord api is currently only available only for those who have bots registered in our botlist! After getting your token, make sure you save it in the .env file!

const Listcord = require('listcord.js');
const client = new Listcord.Client(process.env.LISTCORD_API_TOKEN);

client.getBot('some bot id').then(x => console.log(x));

Methods

Here is a list of a few methods!

await client.getBot('801976787264471120'); // Returns the information of the bot!
await client.getBotReviews('801976787264471120'); // Returns the array of reviews of the bot!
await client.getReview('user id', 'bot id'); // Returns the review details by the discord id of the reviewer and the bot which was reviewed!
await client.hasVoted('user id', 'bot id'); // Verify if the particular user has voted a paticular bot by id!
await client.search('shaz'); // Returns the array of the bots which matches your query!

Events

There are some events of the client such as serverError, rateLimit, error!

client.on('serverError', () => console.log('Looks like the server has got some errors! 500!')); // Event fires when our server gets an error and we could not send you the response!
client.on('rateLimit', () => console.log('Looks like we have sent too much requests! So its 429!')); // Event fires when you have been rate limited by our api!
client.on('error', console.log); // Event fires when an unknown error occurs!

Contact

3.1.0

3 years ago

3.0.0

3 years ago

2.1.5

3 years ago

2.1.0

3 years ago

1.5.1

3 years ago

1.0.0

3 years ago