discord-botlist.eu
  • Introduction
  • API
    • API Endpoints
    • Official packages
      • php package
      • node.js package
      • python package
  • Get Votes via endpoint
  • Getting votes via a local webserver
Powered by GitBook
On this page
  • Install
  • Getting started

Was this helpful?

  1. API
  2. Official packages

node.js package

Offical docs for the discord-botlist.eu node package

Welcome 👋 This package offers you a more user friendly and easier way to interact with the discord-botlist.eu HTTP api. It's made by their developer.

Install

npm i @dbleu/node

Getting started

const API = require("@dbleu/node")
const dbleu = new API("Your API-Token")


// Get an array with all dates when the bot was voted for
dbleu.getVotes().then(votes => {
  console.log(votes)
})

// Get the current information about the bot
dbleu.ping().then(data => {
  console.log(data)
})

// Update the bot stats
dbleu.updateStats(serverCount).then(data => {
  console.log(data)
})

.getVotes()

Parameter

Type

none

none

Promise<Array>

.ping()

Parameter

Type

none

none

.updateStats(serverCount)

Parameter

Type

serverCount

Number or string

{
  "updated": Array<string>,
  "bot": Bot
}
Previousphp packageNextpython package

Last updated 3 years ago

Was this helpful?

Promise<>

Bot
Bot