@discordbotslist/sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

DBL Node SDK

Official module for the interacting with the API on DBL

Installation

yarn add @discordbotslist/sdk or npm i @discordbotslist/sdk

Introduction

The base class for the module is Api it takes your api key as a param. It provides you with many ways to interact with the DBL Api.

Examples

Posting Stats

const client = Discord.Client() // your Discord Client
const { Api } = require('@discordbotslist/sdk')

const api = new Api('key')

setInterval(() => {
    api.postStats(client.user.id, {
        serverCount: client.guilds.size,
        shardCount: client.shard.count
    })
}, 300000) // 1 / 5m or else you will get ratelimited

Getting bot Information

const client = Discord.Client() // your Discord Client
const { Api } = require('@discordbotslist/sdk')

const api = new Api('key')

api.getInfo(client.user.id).then(r => console.log)

Readme

Keywords

none

Package Sidebar

Install

npm i @discordbotslist/sdk

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

11.2 kB

Total Files

22

Last publish

Collaborators

  • friizologyy
  • mistyyboii