Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ibl-api

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibl-api

Main wrapper for infinity bot list to post stats, get info, intract with out webhooks!

  • 2.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

infinity-api

Table Of Contents

  • Installation
  • Usage

Installation

NPM

npm install --save ibl-api

Yarn

yarn install ibl-api

Usage:

Posting:

const discord = require('discord.js');
const client = new discord.Client();
const { IBL } = require('ibl-api');

const ibl = new IBL(client, 'botAuth');

ibl.postStats() //Posts stats (retrieved from bot client)
ibl.autopost(60 * 60 * 1000) //Posts every hour

client.login('token');

Vote Webhooks:

const { IBL } = require('ibl-api');
const discord = require('discord.js');
const client = new discord.Client();

const ibl = new IBL(client, 'botAuth');
ibl.voteWebhook(
    'web auth', //web auth set on bot page
    3001, //port
    '/ibl/webhook' //path to post to, set on bot page
)

ibl.webhook.on("ready", port => {
    console.log(`Infinity Bot List webhook is listening on ${port}`)
});

ibl.webhook.on("vote", async (user, bot, type) => {
  console.log(`${user} voted for ${bot}`);
});

client.login('token');

FAQs

Package last updated on 21 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc