0.1.7-alpha.7 • Published 8 months ago

@infinitylist/sdk v0.1.7-alpha.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@infinitylist/sdk

Simple module for interacting with the Infinity Bot List API!

Quick Links


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

0.1.7-alpha.7

8 months ago

0.1.7-alpha.6

9 months ago

0.1.7-alpha.5

9 months ago

0.1.7-alpha.4

9 months ago

0.1.7-alpha.3

9 months ago

0.1.7-alpha.2

9 months ago

0.1.7-alpha.1

9 months ago

0.1.7-alpha.0

9 months ago

0.1.6

9 months ago

0.1.0

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago