-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Course ECP Command #171
Course ECP Command #171
Conversation
Made xkcd_desc an f string, added spoiler `||` on either side so when it's posted to discord it spoilers the text.
Attempting to create a command that takes in a course code, selected year, semester, mode, and campus and then provides the link to the course profile. Currently it defaults to the current semester and I'm yet to work out how to make it not default.
Need to format the embedded and allow it to take in multiple courses
It assume when requesting you want the same semester, year, mode and campus for all courses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see your first PR! Overall great style. I like the detail in the description of the command. and the error checking is superb (I like how the error messages are informative based on the type of error). There is some code duplication that would be nice if removed, but it really stems from past poor design choices (of mine). Looks like a great command for the bot to have.
- Fixed typo - Clarified error message - Changes wording of the else statement that in theory should never happen because of the exceptions.
Unsure if this will cause issues, doesn't look like it and improve any future use of checking what the estimated current semester is.
Changes as requested made, no clue what to do with Black though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (Other than black)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
You can fix the styling by doing poetry run black uqcsbot
(or python -m poetry run black uqcsbot
, if memory of your setup serves me correctly)
@andrewj-brown or @49Indium Black has been sorted, thank ya'll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sick of closing Discord for 30 seconds to search for the course code? Great news that is no more! With the new
/courseecp
command, you can request the ECPs for up to four courses for a semester, year, mode, and campus. It assumes the courses are offered in the same semester and that they all are the same mode of delivery and campus. If semester, year, mode and campus are not provided, it defaults to the current semester and year.Further development of this command could be removing those assumptions and making it more complex for what it takes as inputs.