You can check out introduction to this repo on my blog: here
Analyze users online, offline, AFK in voice channels.
The front-end repo is here
1. Edit config.json.example and rename it config.json
2. npm install
3. node dist
Or you can copy dist and rename it production
Then run pm2 reload ecosystem.config.js
To use command from this bot, mention the bot.
For example: @Analysis help
@Analysis get [day|week|month] <userID>- Get user online offline data.
@Analysis rank [on|off]- Switch rank display.
- Only administrator or add userID to admin in config.example.json.
- The default value is off
Daily midnight sent yesterday's online time ranking.
Send to the channel where the ranking instruction was sent.
Web on localhost and port is 8787.
/api/day/:serverID- Get server today data (From 0:00 to the next day at 0:00)
/api/week/:serverID- Get server week data (From Monday to Today)
/api/all/:serverIDGet server all data(remove)
/api/custom/:serverID?start=<unixTime>&end=<unixTime>- Get server custom time data
Cache system use Redis.
- Day
- The default is to refresh the Cache every 10 minutes
- Week
- Generate caches from Monday to Today everyday at 12:00 am
-
Change all to time search -
Speed up loading (Cache) -
Change monthly to weekly -
Web pages -
Predicting user status (Abort) -
Web backend -
Command -
Rank - Change Moment.js (Maybe Day.js)
jimchen5209 Provide advice and assistance