Skip to content

Commit 5ad3cb3

Browse files
committed
docs: address PR review comments
- Fix /logs permission: Administrator -> Manage Messages (full-documentation.md, api-reference.md) - Fix regex description: 4-20 alphanumeric -> 12/16-char with symbols/hyphens - Fix code detection example: IDLE2024 (8-char) -> ABCD1234EFGH (12-char valid format) - Fix schema field names: timestamp/loot -> redeemed_at/loot_detail/created_at - Fix debug log cleanup period: 7 days -> 1 hour (debug/), 1 day (api-logs/) Signed-off-by: Michael Cramer <michael@bigmichi1.de>
1 parent 1fdc0fa commit 5ad3cb3

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/api-reference.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ Show the last N lines of the bot's combined log file. Admin only.
843843
|-----------|------|----------|-------------|
844844
| `lines` | integer | No | Number of log lines to show (1-100, default: 20) |
845845

846-
**Permissions**: Requires the `Administrator` permission on the Discord server.
846+
**Permissions**: Requires the `Manage Messages` permission on the Discord server.
847847

848848
**Response Format** (Ephemeral):
849849
```
@@ -861,7 +861,7 @@ Show the last N lines of the bot's combined log file. Admin only.
861861

862862
| Error | Cause | Resolution |
863863
|-------|-------|-----------|
864-
| `PERMISSION_DENIED` | User is not an administrator | Requires Administrator permission |
864+
| `PERMISSION_DENIED` | User lacks Manage Messages permission | Requires Manage Messages permission |
865865
| `LOG_NOT_FOUND` | Log file does not exist | Bot has not run long enough to create logs |
866866

867867
---
@@ -941,7 +941,7 @@ The bot automatically scans all messages in the monitored channel for promo code
941941

942942
**Trigger**: Message posted in monitored Discord channel
943943

944-
**Pattern Matching**: Regular expression matching 4-20 alphanumeric character sequences
944+
**Pattern Matching**: Regular expression matching 12- or 16-character sequences of uppercase alphanumeric and symbol characters (optionally hyphen-separated)
945945

946946
**Detection Pattern**:
947947
```regex
@@ -962,15 +962,15 @@ Does NOT match:
962962
**Detection Behavior**:
963963

964964
```
965-
Message Posted: "Free code: IDLE2024"
965+
Message Posted: "Free code: ABCD1234EFGH"
966966
967967
Bot scans message content
968968
969-
Pattern matches: IDLE2024
969+
Pattern matches: ABCD1234EFGH
970970
971971
Retrieves message author credentials
972972
973-
Calls API: redeemCoupon(IDLE2024)
973+
Calls API: redeemCoupon(ABCD1234EFGH)
974974
975975
Records result in database
976976

docs/full-documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Show the last N lines of the bot's combined log file.
258258

259259
- **Optional parameters:**
260260
- `lines` – Number of log lines (1–100, default: 20)
261-
- **Permissions:** Requires Discord `Administrator` permission
261+
- **Permissions:** Requires Discord `Manage Messages` permission
262262
- **Returns:** Ephemeral embed with log content
263263
- **Example:** `/logs` or `/logs lines:50`
264264

docs/system-design.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ The bot reads promo codes from Discord messages, redeems them via the Idle Champ
185185

186186
**Tables**:
187187
- **users** - User credentials (Discord ID, encrypted user_id, encrypted hash, notification preferences, autoRedeem)
188-
- **redeemed_codes** - Code history (code, redeemer, timestamp, status, loot, is_public, expires_at)
188+
- **redeemed_codes** - Code history (code, discordId, redeemed_at, status, loot_detail, is_public, expires_at)
189189
- **pending_codes** - Codes detected but not yet redeemed by the finder
190-
- **audit_log** - Operation tracking (action, details, timestamp per user)
190+
- **audit_log** - Operation tracking (action, details, created_at per user)
191191
- **backfill_operations** - Backfill run history & global lock (status: in_progress/completed/failed)
192192
- **loot_totals** - Aggregate loot cache (per-user and server-wide counts for `/stats`)
193193

@@ -204,7 +204,7 @@ The bot reads promo codes from Discord messages, redeems them via the Idle Champ
204204
- **Locality**: No network dependency
205205
- **Isolation**: Each user's data accessible only via their Discord ID
206206
- **Encryption**: User credentials encrypted with AES-256-GCM at rest
207-
- **Cleanup**: Debug logs auto-deleted after 7 days
207+
- **Cleanup**: Debug files (`debug/`) deleted after 1 hour; API request logs (`api-logs/`) deleted after 1 day
208208

209209
---
210210

0 commit comments

Comments
 (0)