Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amir-78/discordbotsgg.api
This package makes it easy for you to use the discord.bots.gg API
https://github.com/amir-78/discordbotsgg.api
bot discord discord-bot discord-bots discordbots discordbots-api
Last synced: about 9 hours ago
JSON representation
This package makes it easy for you to use the discord.bots.gg API
- Host: GitHub
- URL: https://github.com/amir-78/discordbotsgg.api
- Owner: Amir-78
- Created: 2021-05-27T21:39:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T08:07:53.000Z (over 1 year ago)
- Last Synced: 2024-09-24T12:03:53.173Z (about 12 hours ago)
- Topics: bot, discord, discord-bot, discord-bots, discordbots, discordbots-api
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# discordbotsgg.api
This package makes it easy for you to use the [discord.bots.gg](https://discord.bots.gg/) API
## Installation- Download [Node.js](https://nodejs.org)
- Write in CMD / Terminal:
```bash
npm i discordbotsgg.api
```
## Example Code:```javascript
const dbAPI = require('discordbotsgg.api');
const { Client, Intents, } = require('discord.js');
const client = new Client({
intents: [Intents.FLAGS.GUILDS,]
});client.on('ready', async () => {
console.log(`Logged in as ${client.user.tag}!`);
//PostStats;
await dbAPI.postStats(client, "API_TOKEN", "BOT_ID", false);});
client.login("TOKEN");
```## Documentation
### Functions:**Name** | **Params** | **Type** | **Function** | **Returns**
---------------|-----------------------|--------------------|------------------------|------------------------------------------------------------------------------------
await postStats() | `client`,`api_token`,`botID`,`refresh` | `Object (Discord.Client)`,`String`,`String`,`Boolean` | `Posts your Bot Stats automatically, if refresh is` true `it will update your bot stats every 30 mins` | `/`
await getBot() | `botID`,`sanitized` | `String`,`Boolean` | `Get a bot using ID`| `Object ({ Bot })`
await getBots() | [Query Params](https://discord.bots.gg/docs/endpoints#get_bots) | [Query Params Types](https://discord.bots.gg/docs/endpoints#get_bots) | `Search for bots using Query Parameters`| `Object`## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.