JSPM

@infinitybots/node-sdk

0.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q38358F

Simple module for interacting with the Infinity Bot List API!

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!


Install

npm i @infinitybots/node-sdk

or

npm i @infinitybots/node-sdk@latest

Infinity 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}`))