Refactor command structure #92

Open
opened 2026-01-25 00:28:58 +00:00 by Ghost · 0 comments
Ghost commented 2026-01-25 00:28:58 +00:00 (Migrated from codeberg.org)

Currently, the command structure has a main command and subcommands, e.g. (/courses has unlocks and course-info).
We want to move these into separate files, to reduce file size and command typing (less characters to type). However, we still want to keep the files organized.

Things to do:

  • Move all the subcommands into their own files, in a grouped folder. For example, there will be a src/commands/courses folder that contains an unlocks.ts, course-info.ts, fce.ts, etc. (resolved by #152)
  • Move all shared functions in to a utils.ts for that folder. For example, we would move the Course type into src/commands/courses/utils.ts
  • Rewrite the command handler to match this new structure
  • Also redirect commands should be done like this (turn them into subcommands)
Currently, the command structure has a main command and subcommands, e.g. (`/courses` has `unlocks` and `course-info`). We want to move these into separate files, to reduce file size and command typing (less characters to type). However, we still want to keep the files organized. Things to do: * ~~Move all the subcommands into their own files, in a grouped folder. For example, there will be a `src/commands/courses` folder that contains an `unlocks.ts`, `course-info.ts`, `fce.ts`, etc.~~ (resolved by #152) * ~~Move all shared functions in to a `utils.ts` for that folder. For example, we would move the `Course` type into `src/commands/courses/utils.ts`~~ * ~~Rewrite the command handler to match this new structure~~ * Also redirect commands should be done like this (turn them into subcommands)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/dalmatian#92
No description provided.