Skip to content

Refactor command structure #92

@maybe-yiyi

Description

@maybe-yiyi

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.
  • 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

Metadata

Metadata

Assignees

Labels

chorefixes that don't approximately result in a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions