generated from ACM-VIT/hacktoberfest-readme
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Group Description
This command group will consist of the following commands:
!taskadd <message>!taskremove <index_number>!tasklist
TaskAdd Command:
When the user runs the command, the bot should do the following tasks:
- check if the key
todolist_<userid>exists in the database (specified in issue Add: Set of functions that act as database functions #34) - if the key exists, then obtain the value of that key (is a string, list of tasks seperated by a
;) - append the new task to this list, and write the entire string back into the database with the same key
todolist_<userid>
TaskRemove Command:
When the user runs this command, the bot must do the following task
- check if the key
todolist_<userid>exists in the database - if the key exists, then obtain the value of that key (is a string, list of tasks seperated by a
;) - parse the string into a list, and delete the entry at the given index
- convert the list back into a string, each element seperated by a semicolon, and write it back into the file with the key
todolist_<userid>
TaskList Command:
Display the list of tasks stored in the database with proper formatting, or a relevant error message