API Documentation

Features:

  • Server Count Stats Posting To Our Website.

  • Bot Information Tracking From Our Website.

Server Count API

Server Count

POST https://nextgenbots.xyz/api/stats

This endpoint you to update the server count on the bot's profile page.

Path Parameters

Name
Type
Description

Authentication

string

An Authorization Token generated by NextGen Bots.

Request Body

Name
Type
Description

server_count

string

The bot's server count

{
    success: true,
    old_servercount: "0",
    servers: "85"
}

Make sure to place this within an event or command. If you do not you may get "Count not found in body" errors!

  const nodefetch = require('node-fetch')
  nodefetch(`https://nextgenbots.xyz/api/stats`, {
    method: 'POST',
    body: JSON.stringify({
     server_count: "server count"
    }),
    headers: { 'Content-Type': 'application/json', auth: 'auth token' }
  }).then(c => 
  c.json()
  )
  .then(c => 
  console.log(c)
  ).catch(err => 
  console.log(err)
  )

Bot Info API

Get Bot Info

GET https://nextgenbots.xyz/api/info

Path Parameters

Name
Type
Description

botid

string

The Bot's ID.

{
    "success": true,
    "botname": "BotName",
    "votes": 0,
    "monthly_votes": 0,
    "servers": "0"
}
const fetch = require("node-fetch");
    let options = fetch(`https://nextgenbots.xyz/api/info`, {
      method: "POST",
      body: JSON.stringify({
        id: "botid"
      }),
      headers: {
        "Content-Type": "application/json",
        auth: "api token"
      }
    })
      .then(c => c.json())
      .then(c => {
      console.log(c)
      }).catch(err)

Last updated