Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A self hosted Discord bot to display your pc stats.

License

NotificationsYou must be signed in to change notification settings

3ddelano/pc-statbot

Repository files navigation

A self hosted Discord bot to display your pc stats.

Nodejs


screenshot

Features

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

  • View or share your PC stats with anyone on Discord

  • Easy to get started

  • 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 commandnpm install oryarn install (needsNode.js).

  • Rename the fileconfig_example.json toconfig.json.
  • GotoDiscord 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 theconfig.json filecopy client id from General information tab
  • Copy the token value from the Bot tab and paste it in theconfig.json filecopy token from Bot tab
  • In the same Bot tab, scroll down and make sure that the 'Message Content' priviledged intent is enabled.enable message content intent from Bot tab

Usage

Either runstart.cmd or open a terminal and runnode 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 types.start

Commands

  • s.help - Shows a help message
  • s.ping - Check API latency
  • s.start - Start the bot (run this only the first time)
  • s.stop - Stop the bot

config.json

This is the configuration file used by the program.

KeyTypeValue
tokenstringThe token of the bot from Discord Developer Page
clientIDstringThe client ID of the bot from Discord Developer Page
intervalintegerThe time in seconds to wait before updating the stats each time
titlestringWill be displayed in the first row of the Bot message
displayActivityboolean | stringWhether to show a presence for the bot. If it is a string, thent the presence will be set to that value.
displayTimestampboolean|stringWhich timestamp format should be displayed. One of true, false, '24h' or '12h'
componentsobjectAn object with key as component name and value as enabled status

Available Components

NameDescription
batteryShows battery percentage and charging status
memoryUsageShows used memory and total memory
cpuUsageShows CPU usage percentage
storageUsageShows 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","displayActivity":"Stats for Delano's PC. See s.help","displayTimestamp":true,"components": {"battery":true,"cpuUsage":true,"memoryUsage":true,"storageUsage":true    }  }

Bugs / Suggestions

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

Other bots

Check out my other bots

Support

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

Contributors

About

A self hosted Discord bot to display your pc stats.

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp