Add ping function
This commit is contained in:
parent
567aef53c5
commit
a59a636d70
6
bot.py
6
bot.py
@ -36,6 +36,8 @@ def on_message(msg):
|
|||||||
do_tasks(arguments, chat_id)
|
do_tasks(arguments, chat_id)
|
||||||
elif command == '/undo':
|
elif command == '/undo':
|
||||||
undo_tasks(arguments, chat_id)
|
undo_tasks(arguments, chat_id)
|
||||||
|
elif command == '/marco':
|
||||||
|
marco(chat_id)
|
||||||
else:
|
else:
|
||||||
add_task(Task(text), chat_id)
|
add_task(Task(text), chat_id)
|
||||||
|
|
||||||
@ -169,6 +171,10 @@ def undo_tasks(task_ids, chat_id):
|
|||||||
set_task(int(i), task, chat_id)
|
set_task(int(i), task, chat_id)
|
||||||
|
|
||||||
|
|
||||||
|
def marco(chat_id):
|
||||||
|
bot.sendMessage(chat_id, "Polo")
|
||||||
|
|
||||||
|
|
||||||
MessageLoop(bot, on_message).run_as_thread()
|
MessageLoop(bot, on_message).run_as_thread()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Reference in New Issue
Block a user