Report Command Implementation - Issue #141#164
Report Command Implementation - Issue #141#164starkatt85 wants to merge 4 commits intoFish-Community:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements a /report command allowing players to report others to staff with predefined reasons. The implementation uses interactive menus to select a target player and report reason, then sends the report via the backend API.
Changes:
- Added
setToArrayimport in general.ts - Implemented
/reportcommand with menu-based player and reason selection - Added a humorous comment about "uwu" in the banned words config
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
| src/config.ts | Added comment questioning the "uwu" ban |
| src/commands/general.ts | Added setToArray import and implemented /report command |
| build/scripts/config.js | Compiled output of config.ts changes |
| build/scripts/commands/general.js | Compiled output of general.ts with report command |
| build/scripts/frameworks/menus.js | Reformatted (no functional changes, just line number updates) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ).catch(() => { | ||
| outputFail('Report cancelled.'); | ||
| return; | ||
| }); |
There was a problem hiding this comment.
The error handling for menu cancellation is inconsistent. When the menu is cancelled via .catch(), the function calls outputFail('Report cancelled.') but then returns undefined, which continues execution. The subsequent if(!target) return; check will properly exit, but the error message is misleading since it suggests the report was cancelled when actually it will proceed if undefined is returned from catch. Consider making the catch handler explicitly return null or use promise rejection to ensure clean control flow.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
why the large diff im shock |
|
Moved to #165 |
based on "#141"
laid the base for report command (idk how to test it from every corner to corner, i tested with what i could using my pc and mobile for two accounts in game).