NPM Package

The NPM package allows you to easily implement the API into your code if you are using Node.js.

Installation.

npm i botsshelter

Initialize Client

const Client = require('botsshelter').default;

const client = new Client('YOUR BOTSSHELTER TOKEN');

To get your token, please read the Official Bot page.

Get function.

client.get('SOME DISCORD BOT ID')
    .then((data) => console.log(data))
    .catch((error) => console.error(error));

You can use the async/await syntax.

Returned data.

// If there is a result:
{
  id: 'Discord ID',
  owner: 'Discord ID',
  collaborators: ['ID 1', 'ID 2', 'etc'],
  description: 'A description',
  invitelink: 'A link',
  supportserver: 'A Discord invite',
  website: 'A link',
  library: 'The Discord library',
  votes: 2, // or other number,
  addedat: 1234 // date in ms
}

// If no bot was found:
undefined

Vote function

Returned data.

true if you successfully voted.

false if your token was wrong, the bot did not exist, or you are rate limited. Only one vote per bot every 12 hours.

Last updated

Was this helpful?