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

discord-bot-analytics

v1.0.14

Published

Get your discord bot analytics with ease

Downloads

20

Readme

discord-bot-analytics

Record discord bot analytics with ease

Getting started

To first get started you will need a key to use https://api.chewey-bot.top/ (Free) Click on any endpoint to view the steps on getting a token

If you are using Discord.js or Eris then this module is already built with full auto reporting

To get started

const cheweyBotAnalyticsAPI=require("discord-bot-analytics")
const customAnalytics = new cheweyBotAnalyticsAPI("YOUR API TOKEN", discordBot)

If you using Discord.js or Eris then thats all you reporting is setup

How to access my analytics

Webdash board (Very Simple) https://cheweyz.github.io/discord-bot-analytics-dash/index.html?id=YOU-USERID (Your UserID is your personal one NOT your botID)

Demo: https://cheweyz.github.io/discord-bot-analytics-dash/index.html?id=220625669032247296

Get all stats for chart (fetch every 5 minutes) https://api.chewey-bot.top/analytics/getall/YOUR-USERID

Getting latest (fetch every minute) https://api.chewey-bot.top/analytics/getlatest/YOUR-USERID

Demo Bot

The following is an example for Eris

const Eris = require("eris");

const bot = new Eris("BOT_TOKEN");

/* Simply add these 2 lines to start tracking */
const cheweyBotAnalyticsAPI=require("discord-bot-analytics")
const customAnalytics = new cheweyBotAnalyticsAPI("YOUR API TOKEN", bot)

bot.on("ready", () => {
    console.log("Ready!");
});

bot.on("messageCreate", (msg) => {
    if(msg.content === "!ping") {
        bot.createMessage(msg.channel.id, "Pong!");
    }
});

bot.connect(); // Get the bot to connect to Discord

Discord.js

const Discord = require('discord.js');
const client = new Discord.Client();

/* Simply add these 2 lines to start tracking */
const cheweyBotAnalyticsAPI=require("discord-bot-analytics")
const customAnalytics = new cheweyBotAnalyticsAPI("YOUR API TOKEN", client)

client.on('ready', () => {
  console.log(`Ready!`);
});

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.reply('Pong!');
  }
});

client.login('token');

What can I track

Currently supported: servers, users, channels, sent messages, received messages, Ram

Details

Analytics are reported at 10minute intervals and stored forever (Details below)

As time goes on the stats will become more aggregated when stored on the server (Up per day stats) This is so more data can be held longer giving better insight to your bot As you may not care about per hour data from 6 months ago hence as time goes it might be compressed to for that day

Whats the catch

There is none as long as I can pay the bills then this service will be free Like the service or want to help out then checkout https://www.patreon.com/CheweyZ

Perks coming soon: Higher resolution data (per minute)