You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-27Lines changed: 39 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ RABot utilizes:
28
28
29
29
## Requirements
30
30
31
-
-[Bun](https://bun.sh) 1.3.6+
32
-
- A Discord bot token
31
+
-[Bun](https://bun.sh) 1.3.10+
32
+
- A Discord application ID, bot token, and RetroAchievements Web API key
33
33
34
34
## Installation
35
35
@@ -55,12 +55,17 @@ Then edit `.env` with your configuration:
55
55
-`DISCORD_APPLICATION_ID` - Your bot's application ID from Discord Developer Portal
56
56
-`LEGACY_COMMAND_PREFIX` - Command prefix for legacy commands (default: `!`)
57
57
-`RA_WEB_API_KEY` - Your RetroAchievements Web API key
58
+
-`RA_CONNECT_API_KEY` - RetroAchievements Connect API key required for `!mem` achievement ID/URL lookups and code notes
59
+
-`RA_CONNECT_API_USER` - RetroAchievements Connect API username (default: `RABot`)
58
60
-`YOUTUBE_API_KEY` - Your YouTube Data API v3 key (optional, for `/gan` longplay searches)
59
-
-`MAIN_GUILD_ID` - Discord guild ID for the main RetroAchievements server
60
-
-`WORKSHOP_GUILD_ID` - Discord guild ID for the RetroAchievements Workshop server
61
+
-`MAIN_GUILD_ID` - Discord guild ID for the main RetroAchievements server (optional, but recommended for production guild authorization)
62
+
-`WORKSHOP_GUILD_ID` - Discord guild ID for the RetroAchievements Workshop server (required for Workshop-only features)
63
+
-`GAMBLER_ROLE_ID` - Discord role ID managed by `/events gambler` (required for Gambler role commands)
64
+
-`CHEAT_INVESTIGATION_CATEGORY_ID` - Category ID required for RACheats `/pingteam ping` restrictions
61
65
-`UWC_VOTING_TAG_ID` - Forum tag ID for active UWC polls (optional)
62
66
-`UWC_VOTE_CONCLUDED_TAG_ID` - Forum tag ID for completed UWC polls (optional)
63
67
-`UWC_FORUM_CHANNEL_ID` - Forum channel ID for UWC auto-detection (optional)
68
+
-`DEV_CHANNELS` - Comma-separated channel IDs where `!mem` may show code notes (optional)
64
69
-`AUTO_PUBLISH_CHANNEL_IDS` - Comma-separated list of announcement channel IDs to auto-publish from (optional)
65
70
-`NODE_ENV` - Environment mode: `development` or `production` (default: `development`)
66
71
-`LOG_LEVEL` - Logging level: `trace`, `debug`, `info`, `warn`, `error`, `fatal` (default: `debug` in dev, `info` in prod)
@@ -70,17 +75,17 @@ Then edit `.env` with your configuration:
70
75
Initialize the database:
71
76
72
77
```bash
73
-
bun db:generate # Generate migration files
74
-
bun db:migrate # Apply migrations
75
-
bun db:seed # Seed default teams (optional)
78
+
bun run db:generate # Generate migration files
79
+
bun run db:migrate # Apply migrations
80
+
bun run db:seed # Seed default teams (optional)
76
81
```
77
82
78
83
## Deploying Slash Commands
79
84
80
-
After adding your bot to a server, deploy the slash commands:
85
+
Deploy the application's global slash commands:
81
86
82
87
```bash
83
-
bun deploy-commands
88
+
bun run deploy-commands
84
89
```
85
90
86
91
This needs to be run:
@@ -94,38 +99,40 @@ This needs to be run:
94
99
### Development
95
100
96
101
```bash
97
-
bun dev # Runs with auto-restart on file changes
102
+
bun run dev # Runs with auto-restart on file changes
98
103
```
99
104
100
105
### Production
101
106
102
107
```bash
103
-
bun start # Standard run
108
+
bun run start # Standard run
104
109
```
105
110
106
111
For production deployments, the bot is automatically deployed via Forge when changes are merged to the main branch. The bot runs under a process supervisor on the production server.
107
112
108
113
## Available Scripts
109
114
110
-
-`bun dev` - Run in development mode with hot reload
111
-
-`bun start` - Run in production mode
112
-
-`bun deploy-commands` - Deploy slash commands to Discord
113
-
-`bun db:generate` - Generate database migrations
114
-
-`bun db:migrate` - Apply database migrations
115
+
-`bun run dev` - Run in development mode with hot reload
116
+
-`bun run start` - Run in production mode
117
+
-`bun run deploy-commands` - Deploy slash commands to Discord
118
+
-`bun run db:generate` - Generate database migrations
119
+
-`bun run db:migrate` - Apply database migrations
120
+
-`bun run db:seed` - Seed default teams
115
121
-`bun run format` - Format code with oxfmt
116
122
-`bun run format:check` - Check formatting without writing
117
-
-`bun lint` - Run oxlint
118
-
-`bun lint:fix` - Run oxlint with auto-fix
119
-
-`bun tsc` - Run TypeScript type checking (via tsgo)
123
+
-`bun run lint` - Run oxlint
124
+
-`bun run lint:fix` - Run oxlint with auto-fix
125
+
-`bun run tsc` - Run TypeScript type checking (via tsgo)
120
126
-`bun run test` - Run all tests
121
127
-`bun run test:watch` - Run tests in watch mode
122
-
-`bun verify` - Run format check, lint, type checking, and tests
128
+
-`bun run verify` - Format, lint-fix, type check, and test locally
129
+
-`bun run ci` - Run CI-safe format check, lint, type checking, and tests
123
130
124
131
## Commands
125
132
126
133
### 🆕 Migration Notice
127
134
128
-
RABot is transitioning to slash commands! When you use a legacy prefix command (e.g., `!gan`), you'll see a migration notice encouraging you to use the modern slash command version (e.g., `/gan`). The legacy command will still work during the transition period.
135
+
RABot is transitioning to slash commands. When you use a linked legacy prefix command (for example, `!gan`), you'll see a migration notice encouraging you to use the modern slash command version (for example, `/gan`). The legacy command will still work during the transition period.
129
136
130
137
### Slash Commands (Recommended)
131
138
@@ -138,20 +145,24 @@ RABot is transitioning to slash commands! When you use a legacy prefix command (
138
145
-`/gan2 <game-id>` - Generate pretty achievement news template with colors
139
146
-`/pingteam` - Team management system (Workshop server only)
140
147
-`/pingteam ping <team>` - Ping all members of a team
141
-
-`/pingteam add <team> <user>` - Add user to team (admin only)
142
-
-`/pingteam remove <team> <user>` - Remove user from team (admin only)
143
-
-`/pingteam create <name>` - Create a new team (admin only)
144
-
-`/uwc` - Create an Unwelcome Concept poll (Workshop server only, auto-manages forum tags)
148
+
-`/pingteam add <team> <user>` - Add user to team
149
+
-`/pingteam remove <team> <user>` - Remove user from team
150
+
-`/pingteam create <name>` - Create a new team
151
+
-`/uwc` - Create an Unwelcome Concept poll (Workshop server only, requires UWC role or admin, auto-manages forum tags)
145
152
-**Auto-detection**: When a new UWC thread is created in the configured forum channel with format `12345: Achievement Title (Game Name)`, the bot automatically posts links to previous discussions for that achievement
153
+
-`/events gambler` - Manage the Gambler role (server only)
154
+
-`/events gambler reset` - Remove the Gambler role from all users
155
+
-`/events gambler award <user>` - Manually award the Gambler role
156
+
-`/events gambler award-all <ach1> <ach2> <ach3> [ach4]` - Award the role to users who unlocked at least 3 listed achievements
146
157
-`/dadjoke` - Get a random dad joke
147
158
-`/frames <input>` - Convert between time and frames at different frame rates
148
159
149
-
### Legacy Prefix Commands (Being Migrated)
160
+
### Legacy Prefix Commands
150
161
151
162
The bot still supports the following legacy prefix commands (all prefixed with `!` by default):
152
163
153
164
-`!topic` - Display the current channel topic
154
-
-`!rule [number]` - Display server rules
165
+
-`!rules [number|coc]` - Display server rules (`!rule`, `!rule2`, and `!rulecoc` aliases are also supported)
155
166
-`!contact` - Show contact information for various RA teams
0 commit comments