motionbotlist

2.0.0 • Public • Published

MotionBotList | NPM

Welcome to the official documentation. v2 is now here, so please re-read this!

How to grab...

API Key

So, to do this just go to this link: https://www.motiondevelopment.top/bots/botid/token

Bot ID

To do this, just go to your bot's website page and look in the URL. I will use Reaction Roles as an example:

https://www.motiondevelopment.top/bots/708096305477451846

At the end of the URL there is the ID!

API Docs

Click Here! This is where you can find all JSON Responses.

Votes

So you wanna grab the votes. Well look no further! Read the example script below to know how to do it:

const motion = require("motionbotlist")

// Make sure this is in an asynchronous function!

let grabbed = await motion.votes("bot ID", "API Token")
// Now "grabbed" is your response JSON.

Response JSON Example:

[
  { id: null, user: false, 'vote-time': 'yyyy-mm-dd hh:mm:ss' },
  {
    id: '000000000000000000',
    user: true,
    user_name: 'user#0000',
    'vote-time': 'yyyy-mm-dd hh:mm:ss'
  }
]

I have no idea why it responds with the { id: null, user: false, 'vote-time': 'yyyy-mm-dd hh:mm:ss' }, I guess it's a bug ?!?

grabInfo

So, with this you can get basically everything that is on the main page of the site, but in JSON.

Example:

const motion = require("motionbotlist")

// Make sure this is in an asynchronous function!

let grabbed = await motion.grabInfo("bot ID", "API Token")
// Now "grabbed" is your response JSON.

Response JSON Example:

{
  Big_desc: '...',
  Small_desc: '...',
  annoucements: {},
  avatar: '...',
  bot_id: '...',
  bot_name: 'Bot#0000',
  bot_status: 'online',
  co_owners: [
    {
      discriminator: '0000',
      id: '000000000000000000',
      public_flags: 11111,
      username: 'CoolDude'
    }
  ],
  discord: '...',
  id: '...',
  invite: '...',
  lib: '...',
  list_date: 'yyyy-mm-dd',
  owner_id: '...',
  owner_name: '᲼Owner#0000',
  prefix: '...',
  public_flags: '11111',
  servers: '111',
  site: '',
  status: 'approved',
  tops: [ 'User management', 'Server management', '...' ],
  username: 'Bot#0000',
  vanity_url: '...'
}

Servers

It's time to update the server count! It's quite easy, just follow the demo:

const motion = require("motionbotlist")

// Make sure this is in an asynchronous function!

let grabbed = await motion.servers("bot ID", "API Token", 0)
//                                                        ^
//                                                        MUST BE AN INTEGER!!!!
// Now "grabbed" is your response JSON.
{
  description: 'Your bots server status has been updated!',
  message: '200 Success',
  success: true
}

Thanks.

Thanks all for the amazing support with this NPM Package. Hope you enjoy this new update for you all!

Readme

Keywords

none

Package Sidebar

Install

npm i motionbotlist

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

6.24 kB

Total Files

6

Last publish

Collaborators

  • sprocx