1.0.1 • Published 4 years ago
discordextremelist v1.0.1
const DEL = require('discordextremelist');
const client = new DEL.Client('clientID', 'API_TOKEN');
/*
* Get information for a bot on the list.
* botID is optional, without it, it will return information about your bot.
*/
client.botInformation('botID')
.then(botInfo => {
console.log(botInfo);
})
.catch(error => {
console.error(error);
});
/*
* Post your guild count to your bots listing.
* guildCount is required, else an error will be thrown.
*/
client.postGuildCount('guildCount')
.then(() => {
console.log('Guild count succesfully logged.');
})
.catch(error => {
console.error(error);
});
/*
* Get information on a server.
* serverID is required, else an error will be thrown.
*/
client.serverInfo('serverID')
.then(serverInfo => {
console.log(serverInfo);
})
.catch(error => {
console.error(error);
});
/*
* Gets information on a template.
* templateID is required, else an error will be thrown.
*/
client.templateInfo('templateID')
.then(templateInfo => {
console.log(templateInfo);
})
.catch(error => {
console.error(error);
});
/*
* Gets information on a user.
* userID is required, esel an error will be thrown.
*/
client.userInfo('userID')
.then(userInfo => {
console.log(userInfo);
})
.catch(error => {
console.error(error);
});
/*
* Returns the health status of the website.
* No arguments.
*/
client.websiteHealth()
.then(webHealth => {
console.log(webHealth);
})
.catch(error => {
console.error(error);
})
/*
* Returns website statistics.
* No arguments.
*/
client.websiteStatistics()
.then(webStats => {
console.log(webStats);
})
.catch(error => {
console.error(error);
});