Package Exports
- @infinitybots/node-sdk
- @infinitybots/node-sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@infinitybots/node-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@infinitybots/node-sdk
Simple module for interacting with the Infinity Bot List API!
Quick Links
Install
npm i @infinitybots/node-sdkor
npm i @infinitybots/node-sdk@latestInfinity Fetcher
Fetch bot information such as checking if a user has voted!
User Vote Status
Check if a user has voted for your bot recently
Usage Example
const { InfinityFetcher } = require("@infinitybots/node-sdk")
const ibl = new InfinityFetcher({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
const results = await ibl.getUserVotes(USER_ID_HERE);
console.log(`Has user voted: ${results.has_voted}`);
console.log(`User can vote again in: ${results.vote_info.vote_time} hours`);
console.log(`User can vote again in: ${results.wait.hours}h ${results.wait.minutes}m ${results.wait.seconds}s`)Get Bot Info
Fetch some Information about your bot from our API
Usage Example
const { InfinityFetcher } = require("@infinitybots/node-sdk")
const ibl = new InfinityFetcher({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
const results = await ibl.getBotInfo();
console.log(`${results.bot_id}`);Infinity Poster
Post your bots user, server or shard count using our api!
Post Server Count
Post only your bots server count
const { InfinityPoster } = require("@infinitybots/node-sdk")
const ibl = new InfinityPoster({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
await ibl.postServerCount({ servers: client.guilds.cache.size })
.then(() => console.log('Stats have been posted successfully'))
.catch((e) => console.log(`Failed posting stats: ${e.stack}`))Post Shard Count
Post only your bots shard count
const { InfinityPoster } = require("@infinitybots/node-sdk")
const ibl = new InfinityPoster({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
await ibl.postShardCount({ shards: client.shards.size })
.then(() => console.log('Stats have been posted successfully'))
.catch((e) => console.log(`Failed posting stats: ${e.stack}`))Post User Count
Post only your bots user count
const { InfinityPoster } = require("@infinitybots/node-sdk")
const ibl = new InfinityPoster({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
await ibl.postUserCount({ users: client.users.cache.size })
.then(() => console.log('Stats have been posted successfully'))
.catch((e) => console.log(`Failed posting stats: ${e.stack}`))Post Bot Stats
Post your bots server, shard and user count
const { InfinityPoster } = require("@infinitybots/node-sdk")
const ibl = new InfinityPoster({
    auth: "YOUR_BOTS_API_KEY",
    botID: "YOUR_BOTS_ID"
});
await ibl.postBotStats({
    servers: client.guilds.cache.size,
    shards: client.shards.size,
    users: client.users.cache.size
 }).then(() => console.log('Stats have been posted successfully'))
.catch((e) => console.log(`Failed posting stats: ${e.stack}`))