All Projects → top-gg → Node Sdk

top-gg / Node Sdk

Licence: apache-2.0
An official module for interacting with the top.gg API

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Node Sdk

Discord Bot
🤖 Our BIG help in things about moderation and many more useful stuff on our Discord server.
Stars: ✭ 30 (-66.67%)
Mutual labels:  api, bot, discord
Jda
Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Stars: ✭ 2,598 (+2786.67%)
Mutual labels:  api, bot, discord
Basicbot
A basic example of a Discord Bot written in Python. (discord.py)
Stars: ✭ 73 (-18.89%)
Mutual labels:  api, bot, discord
Aegis.cpp
Discord C++ library for interfacing with the API. Join our server:
Stars: ✭ 198 (+120%)
Mutual labels:  api, bot, discord
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+308.89%)
Mutual labels:  api, bot, discord
Disgord
Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
Stars: ✭ 277 (+207.78%)
Mutual labels:  api, bot, discord
Mellow
Mellow can communicate with several APIs like Ombi, Sonarr, Radarr and Tautulli which are related to home streaming to use those services directly in your Discord client.
Stars: ✭ 193 (+114.44%)
Mutual labels:  api, bot, discord
Dsharpplus
A .NET Standard library for making bots using the Discord API.
Stars: ✭ 635 (+605.56%)
Mutual labels:  api, bot, discord
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+981.11%)
Mutual labels:  api, bot, discord
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-1.11%)
Mutual labels:  api, bot
Genesis
🤖 Warframe Discord Cephalon
Stars: ✭ 67 (-25.56%)
Mutual labels:  bot, discord
Distube
A Discord.js v12 module to simplify your music commands and play songs with audio filters on Discord without any API key. Support YouTube, SoundCloud, Bandcamp, Facebook, and 700+ more sites
Stars: ✭ 73 (-18.89%)
Mutual labels:  bot, discord
Dashboard.io
Un dashboard pour bot Discord
Stars: ✭ 67 (-25.56%)
Mutual labels:  bot, discord
Dimscord
A Discord Bot & REST Library for Nim.
Stars: ✭ 67 (-25.56%)
Mutual labels:  api, discord
Create Discord Bot
Create Discord bots using a simple widget-based framework.
Stars: ✭ 70 (-22.22%)
Mutual labels:  bot, discord
Slacko
A neat interface for Slack
Stars: ✭ 64 (-28.89%)
Mutual labels:  api, bot
Luna
An adorable Discord.js bot. Free, Open Source and Cross Platform, usable as a solid base for larger projects. Written in NodeJs.
Stars: ✭ 76 (-15.56%)
Mutual labels:  bot, discord
Discord Slash Bot
This bot is a simple Discord Slash Bot.
Stars: ✭ 64 (-28.89%)
Mutual labels:  bot, discord
Mojo Weixin
使用Perl语言(不会没关系)编写的个人账号微信/weixin/wechat客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,181 (+1212.22%)
Mutual labels:  api, bot
Invite Manager
This bot will show who invited who. It's recording and showing the total count of invitations of an user, how many of them left, etc.
Stars: ✭ 77 (-14.44%)
Mutual labels:  bot, discord

Top.gg Node SDK

An official module for interacting with the Top.gg API

Installation

yarn add @top-gg/sdk or npm i @top-gg/sdk

Introduction

The base client is Topgg.Api, and it takes your Top.gg token and provides you with plenty of methods to interact with the API.

Your Top.gg token can be found at top.gg/bot/(BOT_ID)/webhooks and copying the token.

You can also setup webhooks via Topgg.Webhook, look down below at the examples for how to do so!

Links

Documentation

API Reference | GitHub | NPM | Discord Server

Auto-Posting

If you're looking for an easy way to post your bot's stats (server count, shard count), check out topgg-autoposter

Popular Examples

Auto-Posting stats

If you choose not to use topgg-autoposter you can always do it yourself manually;

const client = Discord.Client() // Your discord.js client

const Topgg = require('@top-gg/sdk')

const api = new Topgg.Api('Your top.gg token')

setInterval(() => {
  api.postStats({
    serverCount: client.guilds.cache.size,
    shardId: client.shard.ids[0], // if you're sharding
    shardCount: client.options.shardCount
  })
}, 1800000) // post every 30 minutes

With this your server count and shard count will be posted to top.gg

Webhook server

const express = require('express')
const Topgg = require('@top-gg/sdk')

const app = express() // Your express app

const webhook = new Topgg.Webhook('topggauth123') // add your top.gg webhook authorization (not bot token)

app.post('/dblwebhook', webhook.middleware(), (req, res) => {
  // req.vote is your vote object e.g
  console.log(req.vote.user) // 221221226561929217
}) // attach the middleware

app.listen(3000) // your port

With this example, your webhook dashboard should look like this:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].