GithubHelp home page GithubHelp logo

3eif / topgg-autoposter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpbberry/topgg-autoposter

0.0 0.0 0.0 68 KB

Top.gg Auto-Posting made easy.

Home Page: https://npmjs.com/package/topgg-autoposter

JavaScript 24.56% TypeScript 75.44%

topgg-autoposter's Introduction

Top.gg AutoPoster

Easy AutoPosting via the top.gg sdk

How to

It's really really simple! All you gotta do is:

const { AutoPoster } = require('topgg-autoposter')

const poster = AutoPoster('topggtoken', client) // your discord.js or eris client

// optional
poster.on('posted', (stats) => { // ran when succesfully posted
  console.log(`Posted stats to Top.gg | ${stats.serverCount} servers`)
})

You can also do poster.on('error', (err) => { ... }) and this will stop errors from being logged and left for you to handle

And that's it!

It will begin to post your server count, and shard count every 30 minutes.

This even work on individual Discord.JS shards that are process separated.

If you would like to do specific clients, DJSPoster & ErisPoster & DJSSharderPoster & RosePoster are all exported classes!

Traditional Discord.JS Sharding:

If you use Discord.JS' traditional ShardingManager sharder, you can also append the AutoPoster to the sharding manager like so:

const sharder = new Discord.ShardingManager(...)

const poster = AutoPoster('topggtoken', sharder)

sharder.spawn() // rest of your stuff!

This will run broadcastEval's and automatically fetch your statistics!

Discord-Rose posting

const master = new Master(...)

const poster = AutoPoster('topggtoken', master)

And it will run everything through comms.getStats() function

topgg-autoposter's People

Contributors

3eif avatar alexanderpaolini avatar jpbberry avatar officialpiyush avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.