mjheijster / statbot Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that creates logs compatible with mIRCStats.
License: BSD 3-Clause "New" or "Revised" License
A Discord bot that creates logs compatible with mIRCStats.
License: BSD 3-Clause "New" or "Revised" License
Currently multi-line messages are probably not handled well. Look into how to properly handle this.
Currently, renames of the channel create a headache. By utilizing the channel id's, this would no longer be an issue. Its just harder to search for a channel, but that could be fixed by logging the names and id's separately (a txt file that just shows those links).
Bot version is latest, 1.6.0
Record full line of text
On discord:
16:35]Ile: Testing if the bot broke since it is showing empty lines from today in the log
It only records channel, timestamp and who says the line but actual line is not there. This started happening in the last 24 hours or so.
#general - [2022-09-03 13:35:18] <Ilkka#1111>
Start bot and someone says something
If you have an exception or log, please provide it.
Please explain what you want it to do, what isnt happening yet. You can also discuss it on Discord https://discord.gg/SFYVQNE
Currently channel name changes aren't properly handled. Mircstats sees the following as an issue:
channel name changed from X to Y
channel name changed from Y to X
The logs from Y will be ignored due to overlapping times.
Todo: decide if I should use channelid's or if a mechanism should be used to resume to channel.x.log instead of channel.log.
I have set loggingfilename to single, but conversation from each channel is saved in different files.
"Application": {
// Valid options:
// channelid
// channelname
// single
"LoggingFileName": "single",
"NotificationDelay": 30000,
"PushOver": {
Example of what I'm getting, server.log file is from my old 1.1.2 or something version I had previously running and have manually edited so the timestamp doesn't mean anything:
1.3.1
No response
No response
Log everything with correct timestamps
Session Start: at kesäk. 25 09:10:13 2022
[2022-06-25 06:10:19] message
Wrong timestamps are shown in the bot window and saved in the log file. As you can see, session start is at 09:10:13 and bot logs message 6 seconds later at 06:10:19. Related to timezones since Finland is UTC+3? Bot version is 1.6.0
Open bot
If you have an exception or log, please provide it.
Please explain what you want it to do, what isnt happening yet. You can also discuss it on Discord https://discord.gg/SFYVQNE
Log all channels on a server to a single file
Logs all channels to separate files and mircstats gives error about overlapping timestamps when you try to analyze all logs from server.
I wish to generate mircstats from the whole server, but all channels are logged to separate .log files, which makes mircstats ignore log files because of overlapping timestamps.
If all channels from the server were logged to one file, this wouldn't be a problem.
Last night I noticed that my bot had disconnected from the discord network/server. Didn't save the message it gave me, but it had disconnected by itself (not sure why, could just be a network outage on my server)
Would be good if it could automatically re-connect to the server and keep trying if it can't connect on the first try. (I run the bot in a Windows 2012 server on google cloud, so I'm not constantly monitoring it).
Recognise nicknames with a space
Parser doesn't recognise the nickname with a space in it.
LINES THAT WEREN'T RECOGNIZED BY PARSER **
** Total count: 6 **
<The Corf#6661> message
Perhaps make the nicknames recognised by the parser by removing the space or replacing it with underscore?
Support animated emoji's. Currently they show up as <a:name:serverid>
animated emoji should log as :emojiname:
shows up as s <a:name:serverid>
Generate stats from the bot itself instead of using mircstats.
Currently I'm running a separate program to start mircstats. It would be better to have it handled in StatBot with a configurable batch file and timer.
Suggestion:
Variable timer in minutes
<batches>
<batch></batch>
<batch></batch>
</batches>
A UI for the configuration. This will prevent errors.
The bot could have a command !stats, where it either outputs predefined message containing link to the uploaded stats. This message could be set in the config file, so you can customize it to include server/channel info and the URL for the stats.
e.g:
Ikoutone#1233: !stats
stats-bot#1324: The stats for X can be found at https://url-for-stats.com
<@mention would resolve into <<@mention>
<:emoji: would resolve into <<:emoji:serverid:>
<#channel would resolve into <<#channelid>
There is no proper support for <<
The chance of this happening is really really low, still, this needs to be fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.