Add /mycourses to save and manage courses #193
Labels
No labels
beginner friendly
bug
chore
documentation
duplicate
feature
help wanted
invalid
needs-triage
question
size/L
size/M
size/S
size/XL
size/XS
urgent
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/dalmatian#193
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Create a command that lets users keep track of their courses and share them with others!
Objectives
This command should have the following subcommands:
/mycourses add <course_codes>- add the course(s) to user's list/mycourses remove <course_codes | all>- remove the specified course(s) or all courses from the user's list/mycourses list- show a list of the user's courses saved/mycourses fce- functions the same as/fce <course_codes>As an example, try TurtleBot's
&myclassescommands!Suggested Approach
Add a new file called
mycourses.tsinsrc/commands. For course-related functionality, see if you can import functions fromutils/index.ts,fce.ts, andcourses.tsto avoid code duplication. If necessary, feel free to make minor refactoring changes to these as well to make functionality importable intomycourses.ts.We use Drizzle ORM to work with the database. You'll have to update
db/schema.tswith a new schema representing a table withuser_idandcourse_codes, then rundeno run db:generateanddeno run db:migrateto create and apply your new SQL migration. Seesrc/commands/redirect-list.tsfor a good example of how to use the database.