2023-02-21: New darkbot version v0.3.0 is released
# New Features
Bringing alerts to player amount and alerts to base states.
- if more than X neutral players are present
- if more than X enemy players are present
- if more than X friendly players are present
- if base health is decreasing
- if base health is below threshold like X%
- if base is under attack (triggered by rapid health decrease or spotted base name in attack declaration thread)
By default, only Discord server owner is pinged by those alerts! You can change this by setting different pinging target by running . alert ping_message @your_new_pinging_target
Example of alert
Also base table view had added additional attributes
- Health change of base for the last 15 minutes
- And as warning red non-pinging statuses, if it has its health decreaing or under attack
# How to get started with new features
. --help to check all commands, . alert --help to check new alert commands, . alert base_health_is_lower_than --help to check specific sub commands available to certain alert command
. alert base_health_is_lower_than set 90 to set receiving alerts if any tracked base has health lower than 90%
. alert base_health_is_decreasing enable to set receiving alerts if base health is decreasing
. alert base_is_under_attack enable to set receiving alerts if base health is rapidly decreasing or mentioned in attack declaration thread
. alert player_enemy_count_above set 2 to set receiving alerts if 2 or more enemies appeared in tracked location
. alert player_friend_count_above set 1 to set receiving alerts if 1 or more friends appeared in tracked location
. alert player_neutral_count_above set 2 to set receiving alerts if 2 or more neutral ships appeared in tracked location
. alert player_neutral_count_above unset disabling alert which had set value (you can find it with --help command)
. alert player_neutral_count_above disable disabling alert which had enable value (you can find it with --help command)
. alert player_neutral_count_above status checking alert status (you can find it with --help command)
P.S. thank you again @Xenon for moral support
P.P.S. next milestone to achieve is v0.4.0
P.P.P.S. small notification that all Darkbot settings are individual to connected Discord server channel. Another channel at the same server can be having completely different configuration.
Reported issue:
Message of some tables is deleted and recreated, causing unexpected unnecessary message sending.
Also during same issue, becomes calculated wrong base health change causing unnecessary alarm regarding baseUnderAttack
Status: 23-02-23: Investigating issue. Old issue with memory overflow is not detected.
23-02-23: Possible clue discovered: Only information regarding player bases malfunctioned.
23-02-23: Origin of error is discovered. Failure in quering Freelancer Base API, with returned not expected response body causes those issues, period of Freelenacer Base API failure from 12:04:54 to 12:12:57
23-02-23: Making fix 23-02-23: Deployed fixed version v0.3.3 with properly handled data from errored Freelancer Discovery Base API data
23-02-23: Monitoring applied solution
Read messages/View Channels - for main functionality
Read Message history - for properly working msg deletion in connected channel
Manage Messages - for properly working msg deletion in connected channel
Mention Everyone - for properly working alert configurations in edge cases
P.S. due to discord changing permissions from time to time, having admin level of permissions is still less of a hassle in a long run. Keeping admin link.
Reported issue:
Aingar reported problem of not having access to bot commands
Status: 23-02-26: Deployed version v0.3.4, which fixes access for people with bot_controller role to work
Due to security reasons, access to bot commands is restricted to Server owner or person with role bot_controller.
Because bot deletes all messages in channel to which it is connected (after u run `. connect` command in some channel. run `. disconnect` command to stop this behavior)
Added message regarding that to main post with instruction
P.S. also 23-03-01: Deployed version v0.3.9, which fixes:
bug with incorrect shown Health Change in last 15 minutes (NaN shown numbers)
bug with re triggered alerts during new darkbot deployment
bug with no response from darkbot, when you try to command him with insufficient permissions. It now responds in any case, with information what you need
bug with not working base attack declaration. Now it detects any bases mentioned at last page of Base Attack declaration thread
Raising server: OK
Deploying microk8s: OK
Restoring backup: OK (found 2023-04-03 dated backup. two weeks ago made)
Deploying darkbot: OK
2023-04-16 23-59: Restoring status: OK, server is fully restored back to normal. two weeks data loss.
Postmortem thoughts: everyday backup with cron job to S3 bucket will be made later. If it would have been present today, restoring process could have been with less data loss.
2023-08-11 15-00: Incident: Bot being barely online. Not responding to commands but still working
Notified by schmiddy93 to my discord: 370435997974134785 / darkwind8
Discovered insufficient hardware resources at server. That led to infinity rebooting loop of application, that made it barely, but functional
Looks like increased amount of resources as server was all that was required to fix situation
2023-08-11: Restoring status: OK
Postmortem thoughts: Could be nice to setup more through monitoring system with automated alerts. eventially
Postmortem thoughts #2: I should replace microk8s with simple terraform docker provider ^_^. It will be far less resource hungry solution.