docs: Update Subscription Automation Guide to prioritize admin panel workflow

UPDATED: Part 2 Step 3 - Update Role Mappings in Bot

Changed from manual-only to dual-option approach:

OPTION A (RECOMMENDED): Discord Bot Admin Panel
- Holly can update role IDs herself
- No SSH access needed
- No bot restart needed
- Instant validation and feedback
- Zero downtime
- Audit logs posted to Discord automatically
- Complete workflow documented

OPTION B (MANUAL): SSH + Manual Edit
- Requires Michael's SSH access
- Requires bot restart
- Only use if admin panel not deployed yet
- Kept for backward compatibility

Updated Prerequisites Section:
- Added admin panel access requirement
- Clarified SSH only needed for LuckPerms testing
- Not needed for Discord role management anymore

Benefits of Update:
- Makes admin panel the primary, recommended method
- Reduces Holly's dependency on Michael
- Promotes modern, self-service workflow
- Still documents manual fallback if needed

Guide now properly reflects the new admin panel infrastructure
deployed in discord-bot-admin-panel.md

Chronicler #40
This commit is contained in:
Claude
2026-03-22 13:58:00 +00:00
parent 8ea691ec05
commit c90974d725

View File

@@ -116,7 +116,8 @@ Player can join servers, claim chunks, set homes (based on tier)
**Access Required:**
- Discord server admin permissions
- Pterodactyl panel access (to restart servers)
- SSH access to game servers (for testing)
- SSH access to game servers (for LuckPerms testing)
- **Admin panel access** (for managing Discord role mappings) - see `docs/guides/discord-bot-admin-panel.md`
---
@@ -775,11 +776,47 @@ Frost Legend: 901234567890123456
Sovereign: 012345678901234567
```
### Step 3: Update Bot Code with Role IDs (Michael's Task)
### Step 3: Update Role Mappings in Bot
**Holly:** After you create all the Discord roles and copy their IDs (from Step 2), give the list to Michael. He'll update the bot code.
**After creating all Discord roles (Step 2), you need to tell the bot which role ID corresponds to which subscription tier.**
**You have TWO options:**
---
#### **OPTION A: Use Discord Bot Admin Panel** (RECOMMENDED)
**If admin panel is deployed** (see `docs/guides/discord-bot-admin-panel.md`):
**Holly can do this herself:**
1. Open admin panel: `https://discord-bot.firefrostgaming.com/admin`
2. Click **Login with Discord** (OAuth2 - no password needed)
3. You'll see a form with 10 product tiers
4. For each product, paste the Discord role ID you copied in Step 2
5. Click **Save** for each row (validates and saves instantly)
6. **No bot restart needed** - changes take effect immediately
7. Check `#bot-audit-logs` in Discord to see confirmation embed
**Example workflow:**
```
Product 2 (The Awakened) → Paste role ID → Click Save → ✅ Green confirmation
Product 3 (Fire Elemental) → Paste role ID → Click Save → ✅ Green confirmation
... (repeat for all 10 products)
```
**Status indicator:**
- 🟢 Green dot = Bot connected and working
- 🔴 Red dot = Bot offline (contact Michael)
**Complete guide:** `docs/guides/discord-bot-admin-panel.md`
---
#### **OPTION B: Manual Method** (If admin panel not deployed yet)
**Holly:** Copy all your role IDs and send them to Michael in this format:
**Michael:** Holly will give you a list like this:
```
The Awakened: 123456789012345678
Fire Elemental: 234567890123456789
@@ -793,51 +830,27 @@ Frost Legend: 901234567890123456
Sovereign: 012345678901234567
```
**SSH to Command Center and edit the bot code:**
**Michael:** Holly will give you the list above. SSH to Command Center and update the bot:
```bash
ssh root@63.143.34.217
nano /opt/firefrost-discord-bot/bot.js
```
**Find the `PRODUCT_ROLE_MAP` section and replace it:**
Find the `PRODUCT_ROLE_MAP` or config.json section and update the role IDs.
```javascript
const PRODUCT_ROLE_MAP = {
'2': '123456789012345678', // The Awakened (use Holly's actual ID)
'3': '234567890123456789', // Fire Elemental
'4': '345678901234567890', // Frost Elemental
'5': '456789012345678901', // Fire Knight
'6': '567890123456789012', // Frost Knight
'7': '678901234567890123', // Fire Master
'8': '789012345678901234', // Frost Master
'9': '890123456789012345', // Fire Legend
'10': '901234567890123456', // Frost Legend
'11': '012345678901234567' // Sovereign
};
```
**Save and exit** (Ctrl+X, Y, Enter)
**Restart the bot:**
Save, then restart:
```bash
systemctl restart firefrost-discord-bot
# Verify it restarted successfully
systemctl status firefrost-discord-bot
# Check logs to confirm no errors
journalctl -u firefrost-discord-bot -f
```
**You should see:**
```
✅ Bot logged in as Firefrost Subscription Manager#1234
🌐 Webhook server listening on port 3100
```
**Note:** This manual method requires bot restart and Michael's SSH access. **Option A (admin panel) is much better** - Holly can update roles anytime without waiting for Michael.
**Now hand back to Holly for Part 3.**
---
**After updating role mappings (either method), proceed to Step 4.**
### Step 4: Configure Channel Permissions