Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2m4u/dldapi
The unofficial Discord Lists Development API Module.
https://github.com/2m4u/dldapi
Last synced: 10 days ago
JSON representation
The unofficial Discord Lists Development API Module.
- Host: GitHub
- URL: https://github.com/2m4u/dldapi
- Owner: 2M4U
- Created: 2020-11-29T17:52:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-20T15:18:57.000Z (over 3 years ago)
- Last Synced: 2024-11-09T07:10:00.783Z (11 days ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![npm installinfo](https://nodei.co/npm/dldapi.png?downloads=true&stars=true)](https://www.npmjs.com/package/dldapi)
[![npm version](https://img.shields.io/npm/v/dldapi.svg?maxAge=3600)](https://www.npmjs.com/package/dldapi)
[![npm downloads](https://img.shields.io/npm/dt/dldapi.svg?maxAge=3600)](https://www.npmjs.com/package/dldapi)The Unofficial API Module For **Discord Lists Development** in JavaScript.
#### InstallationUsing **npm**
`npm i dldapi`
Using **yarn**
`yarn add dldapi`
#### Methods
- .postStats()
- *More coming soon*
#### Example(s)
Methods usage:
```js
const DLDAPI = require('dldapi');
const dld = new DLDAPI('BOT_ID','API_KEY');
```- .postStats()
```js
dld.postStats('SERVER_COUNT').then(console.log);
```#### Basic Example
```js
const DLDAPI = require('dldapi');
module.exports = (client) => {
const dld = new DLDAPI(client.user.id, "EXAMPLE");
dld.postStats(client.guilds.cache.size).then((r) => {
console.log(r);
}).catch((err) => {
console.log(err);
});
};
```**__OR__**
```js
const DLDAPI = require('dldapi');
module.exports = async (client) => {
const dld = new DLDAPI(client.user.id, "EXAMPLE");
let res = await dld.postStats(client.guilds.cache.size);
console.log(res);
};
```