[Reviewed] refactor(commands): update commands path and enhance uptime command#24
Open
Abmarne wants to merge 1 commit into
Open
[Reviewed] refactor(commands): update commands path and enhance uptime command#24Abmarne wants to merge 1 commit into
Abmarne wants to merge 1 commit into
Conversation
- Change commands directory from 'commands' to 'slashcommands' for consistency - Refactor uptime command to display uptime with days, hours, minutes, and seconds - Add process ID and memory usage information to uptime embed - Improve uptime message formatting with pluralization and styling - Replace deferred reply with immediate reply in uptime command execution
This was referenced Apr 29, 2026
TrivCodez
requested changes
Apr 29, 2026
Contributor
TrivCodez
left a comment
There was a problem hiding this comment.
What's working well
- Path fix is correct:
commands→slashcommandsmatches actual directory structure - Time formatting: dynamic units with proper pluralization, clean join()
- Embed polish: emoji title, green color, user footer with avatar, timestamp
- Diagnostics: PID and heap usage inline fields give good ops visibility
- Error handling: ephemeral reply on catch, removed unnecessary deferReply
Issues
Blocking
src/deploy-commands.js:7reads directory without existence check. Ifslashcommandsis missing, it throws. Should wrapfs.readdirSync()in try/catch or addfs.existsSync()guard (see PR #23 for same issue).
Verdict
Good to merge once path safety is addressed. Add try/catch around fs.readdirSync() or an existence check to match defensive patterns used elsewhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #20
Changes Made:
Enhanced uptime.js:
Fixed deploy-commands.js:
commandstoslashcommandsto match the actual directory structureFeatures: