Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akrasio/disforge.js
An api wrapper for disforge.com
https://github.com/akrasio/disforge.js
Last synced: 2 months ago
JSON representation
An api wrapper for disforge.com
- Host: GitHub
- URL: https://github.com/akrasio/disforge.js
- Owner: Akrasio
- License: mit
- Created: 2022-05-30T00:21:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T08:17:00.000Z (almost 2 years ago)
- Last Synced: 2024-09-29T01:06:26.270Z (3 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Installation
```bash
npm i disforge.js
```## how to use
```js
const Discord = require("discord.js");
const client = new Discord.Client();
const Disforge = require('disforge.js');
const api = new Disforge.Client("Your-Disforge-API-Key-Here");// Posting manually...
api.postStats(client).then(result => {
console.log(result)
});// Posting every hour automatically :sunglasso:
api.autoPost(client).then(result => {
console.log(result)
});client.login("YourDiscordBotTokenIsHere");
// You can replace "servers_total_members" with one of the strings below for a specific option OR not provide a value to return an object of all data.
/*
"servers_total_members", "servers", "servers_total_members", "bots", "bots_total_servers", "bots_awaiting_approval", "registered_users", "last_updated"
*/
api.stats("servers_total_members").then(result => {
console.log(result)
});
// 10m RateLimit on checking votes
client.on("messageCreate", async (msg) => {
if (msg.author.bot) return;
if (msg.content.toLowerCase() == ";voted") {
api.checkVote(client).then(res => {
console.log(res)
msg.reply(`${res}`)
})
}
})
```-> [disforge.com](https://disforge.com)
-> [disforge.js](https://npmjs.org/disforge.js)