1.0.7 • Published 2 years ago

lestige.js v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Getting Started

First you wanna make sure you have the package installed, If you don't then do npm i lestige.js in your console! After you did that it should be installed!

Start by putting this in your index.js. For a auth token you can head to Lestige and head to your bot and press edit!

const Lestige = require('lestige.js');
const lestige = new Lestige.bot(`<Auth token>`);

Now for putting your bots guild amount onto the site you have to do this!

const Lestige = require('lestige.js');
const lestige = new Lestige.bot(`<Auth token>`);

lestige.post('serverCount', { GuildCount: .guilds.cache.size }); // Output - Successfully put the guild amount to your bot!

> Wanna see if someone voted? Well you can!
```js
const Lestige = require('lestige.js');
const lestige = new Lestige.bot(`<Auth token>`);

async function checkVote(user) {
 const voteData = await lestige.voted(user);

 if (voteData.voted == false) {
    return "Not voted!";
 } else if (voteData.voted == true) {
    return `${voteData.username} has voted for your bot!`
 }
}

checkVote('<Discord UserId>')

Wanna see the vote amount of a bot?

const Lestige = require('lestige.js');
const lestige = new Lestige.bot(`<Auth token>`);

lestige.fetch('votes', { BotID: '' }) // output - I fetched ${votes} votes from ${username}

> Or maybe if the bot is certified!
```js
const Lestige = require('lestige.js');
const lestige = new Lestige.bot(`<Auth token>`);

lestige.fetch('certificate', {
    BotID: '<Bot ID>'
});
// output - The bot ${username} is {certified}