Skip to content

Commit

Permalink
docs: finishing writing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Jun 3, 2024
1 parent 511a0d0 commit 6ffaa17
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 6 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
- The logic of it: User connects darkbot to some discord channel, and sets settings which space bases, player tags or space systems to track. Darkbot repeatedly updates information to discord channel
- project saves ready for deployment docker images [at docker hub](https://hub.docker.com/repository/docker/darkwind8/darkbot/general), see [settings here](https://github.com/darklab8/fl-darkbot/blob/master/tf/modules/production), which are invoking [this configuration](https://github.com/darklab8/fl-darkbot/blob/master/tf/modules/darkbot)

![](docs/index_assets/base_render2.png)
![base tracking table](docs/index_assets/base_render2.png)

![](docs/index_assets/player_render2.png)
![player tracking table](docs/index_assets/player_render2.png)

![forum tracking notifications](docs/index_assets/forum_tracking.png)

# Architecture

Expand Down Expand Up @@ -72,6 +74,9 @@ by providing it through [Environment variables documentated there](./.vscode/set
- We use README for dev specific stuff to documetn
- We use static site generator via mkdocs to document stuff for end users

- The project depends on having two private URL from Discovery API for its running. Provided by Alex.
- Development is possible without them as with env var you can mock data receved from them.

# Dev standards

- Code architecture should be unit testable, even if tests will not be covering everything (Intercepting input from Discord to Cobra CLI and rendering output from it to Discord was made to minimize Discord code footprint to minimum for this reason)
Expand Down
49 changes: 48 additions & 1 deletion docs/features/alerts.md
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
# Alerts
# Alerts

- `. alert` or `. alert --help` helps to find out all avilable alerts. Continue using `--help` for discovered sub commands, to find out all options.
![](https://raw.githubusercontent.com/darklab8/fl-darkbot/master/docs/index_assets/alerts_commands.png)

## Base alerts

### Base health below threshold

- `. alert base_health_is_lower_than set 90` - the most convinient command to receive alerts about. It pings you if any base health below 90% in the current configuration.
- `. alert base_health_is_lower_than status` to check current configuration
- `. alert base_health_is_lower_than unset` to disable alert

### Base under attack

- `. alert base_is_under_attack enable` - turns on alert if spotting the base in forum thread for base attack declarations.
enable, disable, status sub commands are similar.

### Base Health decreasal (may be miss maintained. To check.)

![events view](alerts_base1_commands.png)

- you can turn on `. alert base_health_is_decreasing enable` command for making alert if base rapidly looses its health.

## Player alerts

### Enemy player alert

- `. alert player_enemy_count_above set 1` - Sets alert to ping if spotting enemies above this count in tracked regions/systems.
- `. alert player_enemy_count_above status` to check status of configuration
- `. alert player_enemy_count_above unset` to unset the alert

### Neutral player alert

- `. player_neutral_count_above set 1` - Sets alert if finding more than X neutral players in tracked systems, regions. Convinient command if not knowing who you track, but knowing where.
- commands set, status and unset are similar to enemy alert configuration

### Friends alert

- `. alert player_friend_count_above set 0` - if your friends login, you can spot them right away across galaxy. This command is not affected by which regions/systems you track.
- commands set, status and unset are similar to enemy alert configuration.

## Ping message

- By default Discord server owner is pinged ( `<@DiscordServer.Owner.ID>` )
- `. alert ping_message @here` - You can change to `@here` or `@specific_role` by setting this
- `. alert ping_message status` - you can use sub command `status` to check configuration like
- `. alert ping_message unset` - you can unset to default ping message
17 changes: 16 additions & 1 deletion docs/features/event_tracking.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Events tracking

![events view](https://raw.githubusercontent.com/darklab8/fl-darkbot/master/docs/index_assets/events_table.png)
![events view](https://raw.githubusercontent.com/darklab8/fl-darkbot/master/docs/index_assets/events_table.png)

This feature was implemented on request from Event manager Barrier, for the purpose of easily tracking
that all players participating in event, arrived to the scene.

- `. player event add PlayerPreffixOrSuffix` - add player for tracking for event
- `. player event add Any Partial Name` - add player for tracking for event

- `. player event remove Any Partial Name` - remove specific one from tracking

- `. player event list` - check tracked players
- `. player event clear` - clear all tracked players

P.S. ensure you used `. connect` first one some channel to turn one bot on.
Beware. bot automatically erases msgs for the channel for comfort of its usage.
Use bot on dedicated channel.
6 changes: 6 additions & 0 deletions docs/features/other_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@

- `. base` or `. base --help` will invoke how to use the command
- `. base order_by --help` or `. base order_by`. You can navigate around which commands are available in bot interactively. By finding next sub commands and checking how to use them.

### Auto msg cleanup

- darkbot auto cleans all not related msgs in a minute of time at the channel it is using
- which u chose with `. connect` command.
- to stop msg deletion (and bot activity), just use `. disconnect` in the same channel
2 changes: 1 addition & 1 deletion docs/features/tracking_forum.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Forum tracking

![forum tracking](forum_tracking.png)
![forum tracking](https://raw.githubusercontent.com/darklab8/fl-darkbot/master/docs/index_assets/forum_tracking.png)

### Thread tracking

Expand Down
34 changes: 34 additions & 0 deletions docs/features/tracking_players.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,37 @@

![player view](https://raw.githubusercontent.com/darklab8/fl-darkbot/master/docs/index_assets/player_render2.png)

### Rules

- Added Systems and Regions will show player in Neutral tab.
- Enemy players (see commands below) will be watched only in added systems or regions
- Player Friends will be watched across entire galaxy regardless of configured other stuff.

### System tracking

- `. player system add New York` - add system for tracking (You can add it as just partial name `York`, it should be enough too.)
- `. player system remove New York` - remove specific one from tracking
- `. player system list` - check tracked systems
- `. player system clear` - clear all tracked systems

### Region tracking

- `. player region add Liberty` - to track entire liberty
add, clear, list, remove commands are similar to system tracking.

- Check [Players online at forum](https://discoverygc.com/forums/api_interface.php?action=players_online) to see valid Region names

### Enemy tracking.

Enemy added tags will be matched only for ships in tracked Systems/Regions!.

- `. player enemy add [FactionTag]` - Add factin prefixes (or suffixes)
- `. player enemy add PartialName` - or partial or any full name.

list, remove, add, clear commands are similar to other command groups

### Friends tracking

- `. player friend add My Friend` - for tracking friends acorss entire galaxy

list, remove, add clear commands are similar to other command groups
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- invite both to server [by link](https://discord.com/api/oauth2/authorize?client_id=838460303581904949&permissions=207952&scope=bot)
- You must be Server owner or having `bot_controller` role in order to command the bot.
- add to some channel by writing `. connect` (if u wish to disconnect bot from channel, write `.disconnect`)
- ensure you use bot on dedicated channel created for it. It automatically erases all not related msgs to bot operation after some time.
- get help which commands are available by `. --help` or requesting help on sub commands `. base --help`
- add base tag for tracking `. base tags add Research Station`
- confirm it was added `. base tags list`
Expand All @@ -33,7 +34,7 @@

- remove tag by `. base remove Research Station` or by `. base tags clear`

Continue with [documentation there](https://darklab8.github.io/fl-darkbot/)
Continue with [documentation there](https://darklab8.github.io/fl-darkbot/). See meny with feature documentations at the left.

# Permissions for running

Expand Down
Binary file added docs/index_assets/alerts_base1_commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/index_assets/alerts_commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ffaa17

Please sign in to comment.