2.0.1 • Published 3 years ago

discordbotsgg.api v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

discordbotsgg.api

This package makes it easy for you to use the discord.bots.gg API

Installation

  • Download Node.js
  • Write in CMD / Terminal:
npm i discordbotsgg.api

Example Code:

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:

NameParamsTypeFunctionReturns
await postStats()client,api_token,botID,refreshObject (Discord.Client),String,String,BooleanPosts your Bot Stats automatically, if refresh is true it will update your bot stats every 30 mins/
await getBot()botID,sanitizedString,BooleanGet a bot using IDObject ({ Bot })
await getBots()Query ParamsQuery Params TypesSearch for bots using Query ParametersObject

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.