Paulmski / Discord-Bot

GNU General Public License v3.0
8 stars 7 forks source link

Feature Request: Dynamically change class or assignment times with commands #33

Open Paulmski opened 2 years ago

Paulmski commented 2 years ago

Now that there's integration for both classes and assignments I think the next step is allowing for those events and/or assignments to be modified with commands. After doing some research there appears to be built-in command parsing for the discord.py library. Command group documentation Video explanation

I'm not quite sure how the commands structure would be arranged or perhaps subcommands aren't even necessary. An idea that comes to mind could be a structure like so: !delay {Assignment name} {number of days delayed}

In addition, if the command gets let's say 5 thumbs up reactions (this number could be adjusted) the google sheet is adjusted to reflect the change.

Paulmski commented 2 years ago

Also, I think it's important that there is consensus before implementing the command system so input is welcome!

tuanyvan commented 2 years ago

I like this potential feature for the bot. Oftentimes, when a change is made to the assignments list (Google Sheets), that change isn't really made clear or announced (hidden away in the version history).

Having the Discord Bot make changes to the Google Sheets via community vote ensures everyone sees these changes, and can be done without needing to hop over to the Google Sheet itself.

The scope permissions in gsapi_builder.py will need to be changed to read/edit access and potentially configuration changes to OAuth scope/verification.

Paulmski commented 2 years ago

There is already a built-in !help command in Discord but that will also have to be added to so people can easily see how to interact with the bot.

Potential commands to be implemented:

  1. !add {course code} {assignment name} {due date} {optional time} (Defaults to midnight if no time selected): Add an assignment based off of the information provided to the spread sheet.

  2. !remove {course code} {assignment name}: Remove an assignment from the sheet.

  3. !list {course code} {optional --verbose}: List assignment information from the specified course.

  4. !cancel {course code} {optional date}: If no specific date is specified it will assume the next class is being canceled.

  5. !delay {course code} {time delay}: Delay the next upcoming class by a certain time period. Example: !postpone comp2003 2 hours

  6. !set {course code} {class or assignment name} {class time or assignment due date} {optional time}: Arbitrarily set the time of the next class or the due date of an assignment. If the time is left out it will use the time of the assignment or class that is already set. Examples: !set comp2003 class January 12 2022 !set comp2003 "assignment 4" January 16 2022 !set comp1271 "assignment 2" January 18 2022 5:00 pm !set comp1271 "assignment 2" January 18 2022 17:00

Other notes: We'll have to change the layout of the spreadsheet to accommodate for special exceptions for class times. We also need to separate course names and course codes into separate columns (atomic form). I have a sense this will be a more robust feature, but it will definitely add a richness to the bot especially because it will be able to incorporate community interaction.

Paulmski commented 2 years ago

we can split up the work! I can also make a feature branch for this issue.

Paulmski commented 2 years ago

For those looking through issues, this feature is being put on hold until we switch away from using google spreadsheets to using a proper database.