Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
/ ddblAPI.js Public archive

Official module of Divine Discord Bot List in JavaScript

License

Notifications You must be signed in to change notification settings

lekkerelou/ddblAPI.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddblAPI.js

npm installinfo
Discord Codacy Badge Vulnerabilities Badge npm version npm downloads

Here's the official module of Divine Discord Bot List API in JavaScript.

Installation:

Using npm

npm i ddblapi.js

Using yarn

yarn add ddblapi.js


Methods:

  • .postStats()
  • .getStats()
  • .getVotes()
  • .hasVoted24()

Examples:

Methods usage:

const { ddblAPI } = require('ddblapi.js');
const ddbl = new ddblAPI('BOT_ID', 'API_KEY');
  • .postStats()
ddbl.postStats('SERVER_COUNT')
    .then(console.log);
  • .getStats()
ddbl.getStats('BOT_ID')
    .then(console.log);
  • .getVotes()
ddbl.getVotes()
    .then(console.log);
  • .hasVoted24()
ddbl.hasVoted24('USER_ID')
    .then(console.log);

Webhooks usage:

const { ddblWebhook } = require('ddblapi.js');
const ddbl = new ddblWebhook('PORT', 'AUTH', 'PATH');

ddbl.on('ready', (hook) => {
    console.log(hook);
});

ddbl.on('vote', (vote) => {
   console.log(vote);
});

About

Official module of Divine Discord Bot List in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published