Skip to content

Commit 00039cc

Browse files
committed
docs: update README for clarity and feature enhancements
1 parent 0639b6b commit 00039cc

1 file changed

Lines changed: 98 additions & 104 deletions

File tree

README.md

Lines changed: 98 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,113 @@
1+
<div align="center">
2+
3+
<img src="icon.png" alt="RustPlusBot icon" width="140" />
4+
15
# RustPlusBot
26

3-
[![codecov](https://codecov.io/gh/HandyS11/RustPlusBot/graph/badge.svg?token=jH6L7dDRrq)](https://codecov.io/gh/HandyS11/RustPlusBot)
7+
**A self-hosted Discord bot for the Rust+ companion app** — live map, team & clan chat bridges, smart devices, and a full offline item database, all provisioned automatically in your Discord server.
48

5-
A self-hosted Discord bot for the Rust+ companion app.
9+
[![CI](https://github.com/HandyS11/RustPlusBot/actions/workflows/CI.yml/badge.svg?branch=develop)](https://github.com/HandyS11/RustPlusBot/actions/workflows/CI.yml)
10+
[![SonarQube](https://github.com/HandyS11/RustPlusBot/actions/workflows/Sonar.yml/badge.svg?branch=develop)](https://github.com/HandyS11/RustPlusBot/actions/workflows/Sonar.yml)
11+
[![codecov](https://codecov.io/gh/HandyS11/RustPlusBot/branch/develop/graph/badge.svg?token=jH6L7dDRrq)](https://app.codecov.io/gh/HandyS11/RustPlusBot/tree/develop)
12+
[![.NET 10](https://img.shields.io/badge/.NET-10.0-512BD4?logo=dotnet&logoColor=white)](https://dotnet.microsoft.com/)
13+
[![License: MIT](https://img.shields.io/github/license/HandyS11/RustPlusBot)](LICENSE)
614

7-
## Status
15+
</div>
816

9-
The bot is live: it pairs with Rust+ over FCM, holds a socket per server, and
10-
auto-provisions its own Discord channels. Pairing/connection, the chat bridge,
11-
in-game `!commands` and slash surfaces, live map events, map rendering, smart
12-
devices (switches, alarms, storage monitors), and an offline item database with
13-
recycle/craft/research/decay/upkeep calculators are all shipped. Cameras are next.
17+
---
1418

15-
## Features
19+
The bot is live: it pairs with Rust+ over FCM, holds a socket per server, and auto-provisions its own Discord channels. Pairing/connection, the team & clan chat bridges, in-game `!commands` and slash surfaces, live map events, map rendering, smart devices (switches, alarms, storage monitors), and an offline item database with nine calculators are all shipped. Cameras are next.
1620

17-
### Onboarding & connection
21+
## Channel tour
1822

19-
- **Self-provisioning workspace**`/setup` (Manage Server) creates a global
20-
`RustPlusBot` category (`#information`, `#setup`, `#settings`) plus one category
21-
per paired server. A declarative reconciler keeps channels/messages converged,
22-
self-heals deleted channels, and is idempotent under a per-guild lock.
23-
- **FCM pairing** — connect a Rust+ account from `#setup`; pairing a server in-game
24-
auto-registers it (servers are never typed by hand) and the bot provisions that
25-
server's channels.
26-
- **Credential pool per server** — multiple accounts can pair with the same server;
27-
the bot keeps one live socket per `(guild, server)` with **hot-swap** of the
28-
active player (`/server player`) and **auto-failover** to a standby
29-
credential when one goes invalid (owner is DM'd).
30-
- **Lifecycle controls** — "Remove server" (on `#info`) and "Disconnect account"
31-
(on `#setup`), both Manage-Server-gated with a confirmation step; cascade
32-
cleanup of channels, credentials, and live state.
33-
- **Live `#info` dashboard** — three auto-refreshing embeds below the map image:
34-
**Server** (status, players/queue, in-game time, wipe age), **Events** (cargo /
35-
heli / chinook / both oil rigs), and **Team** (per-member presence, grid, and
36-
survival time). Refreshed on connection-state changes and on a configurable
37-
interval (`Workspace:InfoRefreshInterval`, default 1 min).
38-
- **Bilingual** — every provisioned surface renders in **English or French**,
39-
switchable from a select menu in `#settings`.
23+
Once paired, each Rust server gets its own Discord category — every channel below is created, converged, and self-healed automatically:
4024

41-
### Team chat bridge
25+
| Channel | What lives there |
26+
| --- | --- |
27+
| `#info` | Static map image + three auto-refreshing embeds: **Server**, **Events**, **Team** |
28+
| `#teamchat` | Two-way bridge with in-game team chat |
29+
| `#clanchat` / `#claninfo` | Clan bridge, roster/overview/invites embeds and a live change feed — appear only while the paired player is in a clan |
30+
| `#events` | Live feed for Cargo, Patrol Heli, Chinook, and oil-rig activity |
31+
| `#map` | Rendered live map with toggleable layers |
32+
| `#switches` / `#alarms` / `#storagemonitors` | One embed per paired smart device |
4233

43-
- Two-way relay between in-game team chat and a per-server `#teamchat` channel
44-
(via a managed webhook), with echo/loop suppression.
34+
Plus a guild-global `RustPlusBot` category with `#information`, `#setup`, and `#settings`.
4535

46-
### Clans
36+
## Features
4737

48-
- **Conditional channels**`#clanchat` and `#claninfo` appear automatically when
49-
the paired player is in a clan, and are removed again when they leave; no
50-
command to run either way.
51-
- **`#clanchat`** — two-way relay between in-game clan chat and the channel, sharing
52-
the same echo/loop suppression as the team bridge.
53-
- **`#claninfo`** — three pinned auto-refreshing embeds — **Overview** (score,
54-
member count, creation date, leader, creator, MOTD), **Roster** (members grouped
55-
by clan role, online first, with each role's permissions), and **Invites**
56-
refreshed on the existing `Workspace:InfoRefreshInterval`, plus a live feed of
57-
clan changes (members joining/leaving, promotions/demotions, invites, rename,
58-
MOTD, logo, colour, score, dissolution).
59-
- **Set MOTD** — a button on the overview embed opens a modal that writes the MOTD
60-
back to the game; it is offered only when the paired player's in-game clan role
61-
carries the permission.
62-
- **API limits** — RustPlusApi 2.0.0-beta.4 exposes no clan audit log, no per-member
63-
scores, and no kick/invite/promote actions, so none of those are implemented; the
64-
feed is instead derived by diffing successive clan snapshots.
38+
### Onboarding & connection
6539

66-
### In-game `!commands`
40+
- **Self-provisioning workspace**`/setup` (Manage Server) creates the global category plus one category per paired server. A declarative reconciler keeps channels/messages converged, self-heals deleted channels, and is idempotent under a per-guild lock.
41+
- **FCM pairing** — connect a Rust+ account from `#setup`; pairing a server in-game auto-registers it (servers are never typed by hand) and the bot provisions that server's channels, after an Accept/Dismiss confirmation for new servers.
42+
- **Credential pool per server** — multiple accounts can pair with the same server; the bot keeps one live socket per `(guild, server)` with **hot-swap** of the active player (`/server player`) and **auto-failover** to a standby credential when one goes invalid (owner is DM'd).
43+
- **Lifecycle controls** — "Remove server" (on `#info`) and "Disconnect account" (on `#setup`), both Manage-Server-gated with a confirmation step; cascade cleanup of channels, credentials, and live state.
44+
- **Live `#info` dashboard** — three auto-refreshing embeds below the map image: **Server** (status, players/queue, in-game time, wipe age), **Events** (cargo / heli / chinook / both oil rigs), and **Team** (per-member presence, grid, and survival time). Refreshed on connection-state changes and on a configurable interval (`Workspace:InfoRefreshInterval`, default 1 min).
45+
- **Bilingual** — every provisioned surface renders in **English or French**, switchable from a select menu in `#settings`.
6746

68-
Run in team chat by any teammate; replies in the guild's language with a
69-
configurable per-server prefix (default `!`) and per-command cooldowns:
47+
### Team chat bridge
7048

71-
- **Server**`!pop`, `!time`, `!wipe`
72-
- **Team**`!online`, `!offline`, `!team`, `!alive`, `!steamid [name]`, `!prox [name]`
73-
- **Live events**`!cargo`, `!heli`, `!chinook`, `!small`, `!large`, `!events`
74-
- **Items**`!item`, `!recycle`, `!craft`, `!research`, `!decay`, `!upkeep` (name or id)
75-
- **Control**`!mute` / `!unmute` (gate all bot→game output)
49+
- Two-way relay between in-game team chat and a per-server `#teamchat` channel (via a managed webhook), with echo/loop suppression.
7650

77-
Live server data (population, in-game time, wipe, team, oil rigs) is no longer a
78-
set of ephemeral commands — it renders continuously in the `#info` dashboard
79-
above, and stays available in-game via the `!commands`.
51+
### Clans
8052

81-
- **Items** (ephemeral) — `/item`, `/recycle`, `/craft`, `/research`, `/decay`, `/upkeep` (name or id)
82-
- **Utility**`/help`, `/uptime`, `/leader` (Manage Server — transfer in-game team leadership)
83-
- **Server**`/server player` (Manage Server — hot-swap the active paired account)
84-
- **Admin**`/setup`, `/workspace reset`, `/workspace simulate-server`
53+
- **Conditional channels**`#clanchat` and `#claninfo` appear automatically when the paired player is in a clan, and are removed again when they leave; no command to run either way.
54+
- **`#clanchat`** — two-way relay between in-game clan chat and the channel, sharing the same echo/loop suppression as the team bridge.
55+
- **`#claninfo`** — three auto-refreshing embeds — **Overview** (score, member count, creation date, leader, creator, MOTD), **Roster** (members grouped by clan role, online first, with each role's permissions), and **Invites** — plus a live feed of clan changes (members joining/leaving, promotions/demotions, invites, rename, MOTD, logo, colour, score, dissolution).
56+
- **Set MOTD** — a button on the overview embed opens a modal that writes the MOTD back to the game; it is offered only when the paired player's in-game clan role carries the permission.
57+
- **API limits** — the Rust+ API exposes no clan audit log, no per-member scores, and no kick/invite/promote actions, so none of those are implemented; the feed is instead derived by diffing successive clan snapshots.
8558

8659
### Live map events
8760

88-
- Per-server `#events` feed (and an in-game team-chat mirror) for **Cargo Ship**,
89-
**Patrol Helicopter**, and **Chinook (CH47)** entering/leaving, plus **small /
90-
large oil rig** activation, "crate lootable", and respawn — derived from
91-
polling the Rust+ map markers and monuments.
61+
- Per-server `#events` feed (and an in-game team-chat mirror) for **Cargo Ship**, **Patrol Helicopter**, and **Chinook (CH47)** entering/leaving, plus **small / large oil rig** activation, "crate lootable", and respawn — derived from polling the Rust+ map markers and monuments.
9262

9363
### Map rendering
9464

95-
- Per-server `#map` channel renders the live game map as an image with toggleable
96-
layers — **Grid**, **Markers**, **Monuments**, **Vendor**, **Players**, **Rigs**
97-
controlled from a Manage-Server-gated control message.
65+
- Per-server `#map` channel renders the live game map as an image with seven toggleable layers — **Grid**, **Markers**, **Monuments**, **Vendor**, **Players**, **Rigs**, **Tunnels** — controlled from a Manage-Server-gated control message.
66+
- **Readable at a glance** — monument icons, rotor-composited event markers with dashed movement trails, per-teammate coloured crosses with a matching legend embed, and train-tunnel entrances.
67+
- **Grid conventions** — a per-server `MapGridStyle` setting aligns the grid (and every event grid reference) with either the in-game F1 map or the Rust+/RustMaps convention.
68+
69+
### Smart devices
70+
71+
- **Switches** — one embed per paired smart switch in `#switches`, with on/off toggle and rename.
72+
- **Alarms** — paired smart alarms in `#alarms`, with trigger notifications.
73+
- **Storage monitors** — live contents embeds in `#storagemonitors`, with refresh and rename.
74+
- **Reachability** — every device embed shows an inline status when the device is **removed**, **out of building privilege**, or **not responding**, detected on pairing, on actuation, and by periodic polling.
9875

9976
### Item database & calculators
10077

101-
- An **offline, versioned item dataset** (bundled, ~1200 items) behind one
102-
lookup seam, exposing six calculators both in-game and as ephemeral slash
103-
commands: item info, recycler yields, craft recipes, research scrap cost,
104-
decay time, and building-block upkeep cost.
105-
- **Name-or-id lookup** — type a name (case-insensitive, partial), an exact name,
106-
or a numeric id; multiple matches return a short "did you mean" list.
107-
- **Provenance-aware** — each result footers the date its data was sourced, and a
108-
maintainer [generator tool](tools/RustPlusBot.ItemData.Generator) regenerates the
109-
bundle from upstream (with strict validation) so it never silently rots.
78+
- An **offline, versioned item dataset** (bundled, ~1200 items plus raid targets, smelters, and CCTV codes) behind one lookup seam, exposing nine calculators both in-game and as ephemeral slash commands: item info, recycler yields, craft recipes, research scrap cost, decay time, building-block upkeep, raid cost (`durability`), smelting, and monument CCTV codes.
79+
- **Name-or-id lookup** — type a name (case-insensitive, partial), an exact name, or a numeric id; multiple matches return a short "did you mean" list.
80+
- **Provenance-aware** — each result footers the date its data was sourced, and a maintainer [generator tool](tools/RustPlusBot.ItemData.Generator) regenerates the bundle from upstream (with strict validation) so it never silently rots.
11081

11182
### Foundation
11283

113-
- Multi-guild, self-hosted, per-guild isolation everywhere; SQLite persistence;
114-
credentials protected at rest; fail-fast token validation on startup.
84+
- Multi-guild, self-hosted, per-guild isolation everywhere; SQLite persistence; credentials protected at rest; fail-fast token validation on startup.
85+
86+
## Commands
87+
88+
### In-game `!commands`
89+
90+
Run in team chat by any teammate; replies in the guild's language with a configurable per-server prefix (default `!`) and per-command cooldowns:
91+
92+
| Group | Commands |
93+
| --- | --- |
94+
| Server | `!pop` · `!time` · `!wipe` |
95+
| Team | `!online` · `!offline` · `!team` · `!alive` · `!afk` · `!steamid [name]` · `!prox [name]` |
96+
| Live events | `!cargo` · `!heli` · `!chinook` · `!small` · `!large` · `!events` |
97+
| Items | `!item` · `!recycle` · `!craft` · `!research` · `!decay` · `!upkeep` · `!durability` · `!smelt` · `!cctv` |
98+
| Bot | `!uptime` |
99+
| Control | `!mute` / `!unmute` (gate all bot→game output) |
100+
101+
Live server data (population, in-game time, wipe, team, oil rigs) is no longer a set of ephemeral commands — it renders continuously in the `#info` dashboard, and stays available in-game via the `!commands`.
102+
103+
### Slash commands
104+
105+
| Group | Commands |
106+
| --- | --- |
107+
| Items (ephemeral) | `/item` · `/recycle` · `/craft` · `/research` · `/decay` · `/upkeep` · `/durability` · `/smelt` · `/cctv` |
108+
| Utility | `/help` · `/uptime` · `/ping` · `/status` |
109+
| Manage Server | `/leader` (transfer in-game team leadership) · `/server player` (hot-swap the active paired account) |
110+
| Admin | `/setup` · `/workspace repair` · `/workspace rebuild` · `/workspace purge` · `/workspace reset` · `/workspace simulate-server` · `/admin reset-database` |
115111

116112
## Tech stack
117113

@@ -123,19 +119,14 @@ above, and stays available in-game via the `!commands`.
123119
| Discord persistence | Persistord (prerelease, EF Core 10) |
124120
| Local database | EF Core 10 / SQLite |
125121

126-
## Build & test
122+
## Getting started
127123

128124
```bash
129125
dotnet build RustPlusBot.slnx
130-
```
131-
132-
```bash
133126
dotnet test RustPlusBot.slnx
134127
```
135128

136-
## Run locally
137-
138-
See [docs/development/running-locally.md](docs/development/running-locally.md).
129+
To run the bot locally, see [docs/development/running-locally.md](docs/development/running-locally.md).
139130

140131
## Project layout
141132

@@ -144,6 +135,7 @@ See [docs/development/running-locally.md](docs/development/running-locally.md).
144135
| `RustPlusBot.Abstractions` | Shared seams: `IClock`, `IEventBus`, credential/connection contracts, events |
145136
| `RustPlusBot.Domain` | Entities and enums |
146137
| `RustPlusBot.Persistence` | `BotDbContext`, EF Core services, SQLite migrations |
138+
| `RustPlusBot.Localization` | Shared bilingual string catalog (`Strings.resx`) and `ILocalizer` |
147139
| `RustPlusBot.Discord` | Discord.Net gateway, hosted service, interaction modules |
148140
| `RustPlusBot.Features.Workspace` | Channel/message provisioning, reconciler, `#info`/`#setup`/`#settings` surfaces |
149141
| `RustPlusBot.Features.Pairing` | FCM pairing listener, credential intake, account disconnect |
@@ -153,27 +145,29 @@ See [docs/development/running-locally.md](docs/development/running-locally.md).
153145
| `RustPlusBot.Features.Commands` | In-game `!commands`, slash surfaces, `/help`/`/leader` |
154146
| `RustPlusBot.Features.Events` | Live map-event classification + `#events` feed |
155147
| `RustPlusBot.Features.Map` | Map image rendering with toggleable layers |
156-
| `RustPlusBot.Features.ItemData` | Bundled item dataset, lookup seam, recycle/craft/research/decay/upkeep data |
148+
| `RustPlusBot.Features.Players` | Team presence, AFK tracking, `#info` Team embed |
149+
| `RustPlusBot.Features.Wipes` | Wipe detection and wipe-age tracking |
150+
| `RustPlusBot.Features.Switches` | Smart-switch embeds and toggling |
151+
| `RustPlusBot.Features.Alarms` | Smart-alarm embeds and trigger notifications |
152+
| `RustPlusBot.Features.StorageMonitors` | Storage-monitor contents embeds |
153+
| `RustPlusBot.Features.ItemData` | Bundled item dataset, lookup seam, calculator data |
157154
| `RustPlusBot.Host` | Generic Host entry point, DI wiring, startup validation |
158155

159-
The `tools/` folder holds maintainer utilities that are not part of the running
160-
bot — currently
161-
[`RustPlusBot.ItemData.Generator`](tools/RustPlusBot.ItemData.Generator), which
162-
regenerates the embedded item dataset.
156+
The `tools/` folder holds maintainer utilities that are not part of the running bot — currently [`RustPlusBot.ItemData.Generator`](tools/RustPlusBot.ItemData.Generator), which regenerates the embedded item dataset.
163157

164158
## Roadmap
165159

166160
Subsystems are built in order; each has its own spec → plan → build cycle.
167161

168162
| # | Subsystem | Status |
169163
| --- | --- | --- |
170-
| 0 | Foundation (bootable host, config/persistence, workspace provisioning) | Done |
171-
| 1 | Pairing & connection (FCM, credential pool, hot-swap, auto-failover) | Done |
172-
| 2 | Map + live events (events feed, oil-rig detection, map render + layers) | Done |
173-
| 3 | Chat bridge + `!commands` + slash surfaces | Done |
174-
| 4 | Smart devices (switches, alarms, storage monitors) | Done |
175-
| 5 | Cameras | Planned |
176-
| 6 | Item database & calculators (recycle/craft/research/decay/upkeep) | In progress |
164+
| 0 | Foundation (bootable host, config/persistence, workspace provisioning) | Done |
165+
| 1 | Pairing & connection (FCM, credential pool, hot-swap, auto-failover) | Done |
166+
| 2 | Map + live events (events feed, oil-rig detection, map render + layers) | Done |
167+
| 3 | Chat bridge + `!commands` + slash surfaces | Done |
168+
| 4 | Smart devices (switches, alarms, storage monitors, reachability) | Done |
169+
| 5 | Cameras | 🔜 Planned |
170+
| 6 | Item database & calculators (recycle/craft/research/decay/upkeep/durability/smelt/cctv) | ✅ Done |
177171

178172
## License
179173

0 commit comments

Comments
 (0)