1
0

Added responses to more commands

This commit is contained in:
Akbar Rahman 2018-06-26 21:00:32 +01:00
parent a59a636d70
commit 991cf35adf
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

3
bot.py
View File

@ -53,6 +53,7 @@ def rm_task(task, chat_id):
tasks = get_tasks(chat_id)
tasks.remove(task)
set_tasks(tasks)
bot.sendMessage(chat_id, "Removed task {0}".format(task))
def rm_tasks(tasks, chat_id):
@ -162,6 +163,7 @@ def do_tasks(task_ids, chat_id):
task = get_task(int(i), chat_id)
task.do()
set_task(int(i), task, chat_id)
bot.sendMessage(chat_id, "Did task {0}".format(i))
def undo_tasks(task_ids, chat_id):
@ -169,6 +171,7 @@ def undo_tasks(task_ids, chat_id):
task = get_task(int(i), chat_id)
task.undo()
set_task(int(i), task, chat_id)
bot.sendMessage(chat_id, "Undid task {0}".format(i))
def marco(chat_id):