https://github.com/codemeapixel/fates.js
NPM Wrapper for the Fates List API
https://github.com/codemeapixel/fates.js
api bot bot-list discord javascript list node npm wrapper
Last synced: 5 months ago
JSON representation
NPM Wrapper for the Fates List API
- Host: GitHub
- URL: https://github.com/codemeapixel/fates.js
- Owner: CodeMeAPixel
- Created: 2021-04-23T18:35:50.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-23T19:15:14.000Z (almost 5 years ago)
- Last Synced: 2025-10-01T10:43:27.326Z (5 months ago)
- Topics: api, bot, bot-list, discord, javascript, list, node, npm, wrapper
- Language: JavaScript
- Homepage: https://fateslist.xyz/
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- Security: SECURITY.md
Awesome Lists containing this project
README
# fates.js
The official NPM Module for interacting with the Fates List API
---
## Installation
`npm i --save github:TheRealToxicDev/fates.js`
---
## Hard Coded Install
Append the Line below to your package.json
```
"fates.js": "https://github.com/TheRealToxicDev/fates.js",
```
---
## Posting Stats
### Constructor
```
FL(client, token)
```
###### Arguments
Parameter | Type | Optional | Description
|--------------|----------|--------------|--------------|
token | String | No | The API Auth Token found on your bots page.
client | Snowflake | No | The Client ID for the bot you want to post stats to.
---
### Discord.js v12 Example
```js
const Discord = require("discord.js")
const client = new Discord.Client()
const prefix = "!";
const FL = require("fates.js")
const Fates = new FL(client.user.id, "bot-auth-token")
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}.`)
setInterval(() => {
/* Here is where we Post the stats to the Site (Only use one of these) */
Fates.post(client.guilds.cache.size) /* Will `POST` server count*/
//Fates.post(client.guilds.cache.size, client.shard.count) /* Will `POST` server and shard count*/
})
}, 300000) //5 Minutes in MS
client.on("message", message => {
if(message.author.bot) return
if(message.content == prefix + "ping"){
message.reply(`Pong! it took ${client.ws.ping}`)
}
})
client.login("token")
```
---
## Getting Stats
### Constructor
```
FL()
```
### Example
```js
COMING SOON
```