Skip to content

Commit e9c5ee7

Browse files
eugenio412jh0ker
authored andcommitted
solved the bug that prevented the unset to work
1 parent f2f6242 commit e9c5ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/timerbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def set(bot, update, args, job_queue):
6060
bot.sendMessage(chat_id, text='Usage: /set <seconds>')
6161

6262

63-
def unset(bot, update):
63+
def unset(bot, update, job_queue):
6464
"""Removes the job if the user changed their mind"""
6565
chat_id = update.message.chat_id
6666

@@ -89,7 +89,7 @@ def main():
8989
dp.add_handler(CommandHandler("start", start))
9090
dp.add_handler(CommandHandler("help", start))
9191
dp.add_handler(CommandHandler("set", set, pass_args=True, pass_job_queue=True))
92-
dp.add_handler(CommandHandler("unset", unset))
92+
dp.add_handler(CommandHandler("unset", unset, pass_job_queue=True))
9393

9494
# log all errors
9595
dp.add_error_handler(error)

0 commit comments

Comments
 (0)