mblapi.js
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

MblApi.js

This is the official api of My Bot List (I think)

Installation

npm i mblapi.js --save

Exemples

Posting the number of servers in the discord.js library

const Discord = require('discord.js')
const client = new Discord.Client()
const mbl = require('mblapi.js')
const MblClient = new mbl('YOUR TOKEN', client)

MblClient.on('posted', () => {
  console.log('Server count has been posted')
})

Getting a bot with id

const Discord = require('discord.js')
const client = new Discord.Client()
const mbl = require('mblapi.js')
const MblClient = new mbl('YOUR TOKEN', client)

MblClient.getBot('470684281102925844')
//Returns
/*{ id: '470684281102925844',
  guilds: 38,
  desc: 'An awesome Bot with awesome commands',
  markdown:
   '#   Bot top\n\n<img src="https://i.imgur.com/r2sGfIk.jpg" alt="cat" title="image">',
  favorites: 5,
  lib: 'Discord.js',
  rating:
   { rating: 85.23076923076923,
     comments: [...] },
  owner: '365948625676795904',
  visits: 107,
  views: [...],
  prefix: 'j!',
  server: '',
  tags: [...],
  github: 'https://github.com/Acnologla',
  site: 'http://asura-site.glitch.me/',
  background: 'https://i.imgur.com/r2sGfIk.jpg' }
*/

Getting the people who marked the bot a favorite

const Discord = require('discord.js')
const client = new Discord.Client()
const mbl = require('mblapi.js')
const MblClient = new mbl('YOUR TOKEN', client)

MblClient.getFavorites()
//returns array with the id of people as liked

// ['28934893280480985']

Package Sidebar

Install

npm i mblapi.js

Weekly Downloads

0

Version

0.2.0

License

ISC

Unpacked Size

5.05 kB

Total Files

6

Last publish

Collaborators

  • srynerd_ofc