Skip to content
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

Updated SFU modules to slash cmds #670

Closed

Conversation

chanchantang
Copy link

@chanchantang chanchantang commented Nov 10, 2024

EDIT: mistakenly pushed a different issues code into this branch, please ignore this PR

Description

In regard to issue #667

Converted def sfu() and def outline() to slash commands. Also rewrote existing commands to be more clean and DRY.

Things to Note:

  • For outline(), I am unsure how to have the optional argument “next”, current setup as an input argument called arg
  • There may be a better way to chunk _construct_fields()
  • _construct_fields() could not use the info and schedule arguments, however it would require interaction to embed an error message. Unsure which is better
  • For _split_course, I return an error using a third return value, there may be a better way to do this
  • Image for thumbnail seems to be broken, so I removed it
  • Room always seems to be TBD
  • Apparently we do not need to use the json library since we can just use request library, I am unsure how while chunking the data
  • For the courses() function, it does not chunk the get request, could be a concern

PR Checklist

All test cases done in the test cases section are passed except for required arguments now being shown in the Discord UI due to the command being converted from . to /

@chanchantang chanchantang requested a review from a team as a code owner November 10, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant