From e9c5ee7ad63c194ff23ef6a5f82aa46e05bf9c73 Mon Sep 17 00:00:00 2001 From: eugenio412 Date: Tue, 16 Aug 2016 21:13:31 +0200 Subject: [PATCH] unset but (#383) solved the bug that prevented the unset to work --- examples/timerbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/timerbot.py b/examples/timerbot.py index deb0cf076..7bd4d3023 100644 --- a/examples/timerbot.py +++ b/examples/timerbot.py @@ -60,7 +60,7 @@ def set(bot, update, args, job_queue): bot.sendMessage(chat_id, text='Usage: /set ') -def unset(bot, update): +def unset(bot, update, job_queue): """Removes the job if the user changed their mind""" chat_id = update.message.chat_id @@ -89,7 +89,7 @@ def main(): dp.add_handler(CommandHandler("start", start)) dp.add_handler(CommandHandler("help", start)) dp.add_handler(CommandHandler("set", set, pass_args=True, pass_job_queue=True)) - dp.add_handler(CommandHandler("unset", unset)) + dp.add_handler(CommandHandler("unset", unset, pass_job_queue=True)) # log all errors dp.add_error_handler(error)