1.2.2 • Published 2 years ago

@foup/topgg v1.2.2

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

About

@foupp/topgg is a API wrapper for Top.gg that allows you to manage your discord bot

  • Quick setup
  • Simple functions

Installation

npm install @foupp/topgg

Create a connection between your Top.gg bot and the API

import Client from '@foupp/topgg';
import Discord from 'discord.js';

const client = new Discord.Client();

const TopGGClient = new Client("TOPGG_WEBHOOK_TOKEN", client);

Afterwards we can create a quite simple example usage:

import DBL from '@foupp/topgg';
import { Client, GatewayIntentBits } from 'discord.js';

const client = new Client({ intents: [GatewayIntentBits.Guilds] });
const TopGG = new DBL("webhook-token", client);

client.on('ready', async () => {
	await TopGG.postStats({
		server_count: 123
	});
	console.log(`Logged in as ${client.user.tag}!`);
});

TopGG.on("posted", () => console.log("Top.gg stats have been updated!"))

client.login('token');

Links

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago