Coder Social home page Coder Social logo

pc-statbot's Introduction

PC STAT BOT

A self hosted Discord bot to display your pc stats.
Nodejs
screenshot

Features

  • Displays periodically updated stats like CPU Usage, Memory, Storage and Battery stats

  • View or share your pc stats to other devices

  • Easy to host

  • One of a kind

  • Modular design

Installation

Download the repo as a zip and extract it to a folder. Open a command prompt in that folder and and then run the command npm install (needs Node.js).

  • Rename the file config_-_example.json to config.json.
  • Goto Discord Developer Page and make a new application.
  • Give it any name.
  • Then go to the OAuth2 tab and copy the ClientID and paste it in the config.json file
  • Copy the token value from the Bot tab and paste it in the config.json file

Usage

Either run start.cmd or open a terminal and run node server.js
For the first run, click on the invite link in the terminal and add the bot to whichever server you want, then goto any channel in that server where you want the stats and type s.start

Commands

  • s.help - Shows a help message
  • s.ping - Check API latency
  • s.start - Start the bot (once only)

config.json

This is the configuration file used by the program.

Key Type Value
token string The token of the bot from Discord Developer Page
clientID string The client ID of the bot from Discord Developer Page
interval integer The time in seconds to wait before updating the stats each time
title string Will be displayed in the first row of the Bot message
activityDisplay boolean If the activityDisplay of the Bot should be set
displayTimestamp boolean/ integer Witch timestamp the Bot should display. Config help here
components object An object with key as component name and value as enabled status

Available Components

Name Description
battery Shows battery percentage and charging status
memoryUsage Shows used memory and total memory
cpuUsage Shows CPU usage percentage
storageUsage Shows used storage and total storage

Example config.json

{
    "token": "token from bot section of discord developer page",
    "clientID": "client id from oauth2 section of discord developer page",
    "interval": 30,
    "title": "pc-statbot",
    "activityDisplay": true,
    "displayTimestamp": true,
    "components": {
      "battery": true,
      "cpuUsage": true,
      "memoryUsage": true,
      "storageUsage": true
    }
  }

Time format options

	"displayTimestamp": true,
  • false: displays no timestamp
  • true: displays the time in the 12h format
  • 12h: displays the time in the 12h format
  • 24h: displays the time in the 24h format

Bugs / Suggestions

Report any bugs / glitches, or make a suggestion using the github issues section or join the support server Join Server.

Other bots

Check out my other bots

Support

Join the Discord Server: 3ddelano Cafe
Support the creator
Buy Me A Coffee

Contributors

pc-statbot's People

Contributors

3ddelano avatar lukasl28 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.