# VRBattles Discord Bot – Issue Tracker Use this checklist to track code-quality fixes and consistency updates. Check items off as completed and commit this file with your changes. ## How to use - Edit this file, change "[ ]" to "[x]" for completed items, and include a short note or PR link if helpful. ## Checklist - [ ] Replace admin permission check with PermissionFlagsBits.Administrator - Location: `src/commands/CommandHandler.js` (in `handleRegisterServer`) - Desired: `interaction.member.permissions.has(PermissionFlagsBits.Administrator)` - [ ] Replace legacy `flags` ephemeral usage with `ephemeral: true` - Location: various replies in `src/commands/CommandHandler.js` and `src/commands/SubscriptionCommands.js` - Notes: decide ephemerality at `reply`/`deferReply`; it cannot be changed via `editReply` - [ ] Switch `interaction.isCommand()` to `interaction.isChatInputCommand()` - Location: `src/Bot.js` (in `handleInteraction`) - [ ] Use `PermissionFlagsBits` for channel permission checks - Location: `src/services/NotificationService.js` - Replace string permissions (e.g., 'SendMessages', 'ViewChannel') with `PermissionFlagsBits.*` - [ ] Clean up `SubscriptionCommands` duplicates and constructor mismatch - Location: `src/commands/SubscriptionCommands.js` - Remove duplicated methods (`getGame`, `createOrUpdateSubscription`, `safeReply`), fix constructor to accept `(supabase, logger)` and use the injected logger - [ ] Fix `PlayerService` logging - Location: `src/services/PlayerService.js` - Inject a logger or use a consistent logging strategy; remove `this.logger` references if not injected - [ ] Align `/help` category choices with handler expectations - Locations: - `deploy-commands.js` (slash command choices for `help`) - `src/commands/HelpCommand.js` (expects categories like `getting_started`, `search`, etc.) - Decide whether to offer topic categories or game names and make both sides consistent - [ ] Add guild-scoped slash command deployment for development - Location: `deploy-commands.js` (or add a new `deploy-commands.dev.js`) - Use `Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID)` for fast iteration in dev - [ ] Standardize interaction handlers and checks - Ensure consistent use of `isChatInputCommand`, `isButton`, and ephemerality decisions across commands and buttons ## Notes - Keep PRs small and focused (one checklist item per PR when possible). - Update this file with any extra context, follow-ups, or links.