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

php package

Install

composer require dbleu/php-libary

Getting started

<?php
use dbleu\Main;

require_once __DIR__ . '/vendor/autoload.php';

// Init Libary
$api = new Main("<API Token>");

// Get an array with all dates when the bot was voted for
$votes = $api->getVotes();
var_dump($votes);

// Get the current information about the bot
$information = $api->getBotData();
var_dump($information);

// Update the server count
$newCount = 1;
$count = $api->updateGuildCount($newCount);
var_dump($count);

getVotes()

Parameter

Type

none

none

Array

getBotData()

Parameter

Type

none

none

Object

udateGuildCount(serverCount)

Parameter

Type

updateGuildCount

Integer

{
  "updated": Array,
  "bot": Object
}
PreviousOfficial packagesNextnode.js package

Was this helpful?