npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

disgrow

v2.0.1

Published

A growth increments for your Discord bots

Downloads

26

Readme

disgrow is a module for Discord bots. It allows you to check your bot's growth statistics,
Update hourly, and the hope that it will be reusable for every bot developers.
The prerequisites should be met before using this library.

ContributingDocumentationReport Issues


The problem

There is a plenty monitoring and observability service for cloud-scale application, such as StatsD, DataDog, Prometheus, and etc. Those services are great for monitoring, but require a lot of effort to posts every parts and setup properly, many people probably still confused how to extends their discord bots with those services. Apart from complexity, the services is running, means It will consume extra Memory than usual, especially DataDog.

The solution

There is a simple way to monitor your bot's growth. This library allows you to check your bot's growth statistics, no need posts any data, no need to extends or change your bot constructor, out of the box and less of pain.

For non JavaScript libraries, there is an API for it!

Features

Don't expect more with zero configuration, the point is it can give you actionable data related your bots increments.

  • Summary stats daily and hourly
  • Average increments
  • Approximate increments
  • Compare with other bots
  • Expect even more features in the future..

🚀Installation

yarn add disgrow / npm i disgrow

Prerequisites

Your bot must be listed on top.gg, because this module consume top.gg data, and You must Posting bot stats at least once per hour, there is a stats_hourly property in this module, otherwise null as it misleading.

Documentation

The documentation can be found https://sinkaroid.github.io/disgrow

Example

import Disgrow from "disgrow";

const bot = new Disgrow("724047481561809007");
bot.myStats().then((res) => { console.log("myStats", res); });

CommonJS should do with const Disgrow = require("disgrow");

The returns

  • res.data: object
    • The bot's information
  • res.data.stats_daily : object
    • List of daily stats in the last 25 days
  • res.data.stats_hourly : object
    • List of hourly stats in the last 25 hours
  • res.average_server_growth_hourly : number
    • Average server growth hourly
  • res.average_server_growth_daily : number
    • Average server growth daily
  • res.average_server_growth_monthly : number
    • Average server growth monthly
  • res.average_votes_growth_monthly : number
    • Average votes growth monthly on top.gg
  • res.approximate_credits_rewards_monthly : string
  • res.approximate_server_growth_three_months : number
    • Approximate server growth after 3 months
  • res.approximate_server_growth_annually : number
    • Approximate server growth after 1 year
{
   "data":{
      "title":"Scathach",
      "server_count":17997,
      "shard_count":2,
      "monthly_votes":5587,
      "total_votes":31927
   },
   "stats_daily":[
      {
         "date":"June 25, 2022",
         "total_server":17997,
         "total_votes":31927,
         "server_growth":"+76",
         "votes_growth":"+432"
      },
      {
         "date":"June 24, 2022",
         "total_server":17921,
         "total_votes":31495,
         "server_growth":"+154",
         "votes_growth":"+687"
      },
      {
         "date":"",
         "total_server":"0",
         "total_votes":null,
         "server_growth":"0",
         "votes_growth":"0"
      },
      {
         "date":"June 22, 2022",
         "total_server":17767,
         "total_votes":30808,
         "server_growth":"+97",
         "votes_growth":"+251"
      },
      {
         "date":"June 21, 2022",
         "total_server":17670,
         "total_votes":30557,
         "server_growth":"+109",
         "votes_growth":"+259"
      }
   ], // 25 items
   "stats_hourly":[
      {
         "date":"Jun, 25 24:00",
         "total_server":17997,
         "server_growth":"+4"
      },
      {
         "date":"Jun, 25 23:00",
         "total_server":17993,
         "server_growth":"0"
      },
      {
         "date":"Jun, 25 22:00",
         "total_server":17993,
         "server_growth":"+4"
      },
      {
         "date":"Jun, 25 21:00",
         "total_server":17989,
         "server_growth":"+7"
      },
      {
         "date":"Jun, 25 20:00",
         "total_server":17982,
         "server_growth":"-1"
      }
   ], // 25 items
   "average_server_growth_hourly":3,
   "average_server_growth_daily":66,
   "average_server_growth_monthly":1654,
   "average_votes_growth_monthly":5586,
   "approximate_credits_rewards_monthly":"20.485 USD",
   "approximate_server_growth_three_months":6006,
   "approximate_server_growth_annually":24090
}

Limitations

  • stats_daily and stats_hourly are limited to 25 items, If you want to save them all in every months You should save them in somewhere else, like database.

Legal

This tool can be freely copied, modified, altered, distributed without any attribution whatsoever. However, if you feel like this tool deserves an attribution, mention it. It won't hurt anybody