mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-25 08:37:07 +01:00
parent
f2f62423ba
commit
e9c5ee7ad6
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ def set(bot, update, args, job_queue):
|
||||||
bot.sendMessage(chat_id, text='Usage: /set <seconds>')
|
bot.sendMessage(chat_id, text='Usage: /set <seconds>')
|
||||||
|
|
||||||
|
|
||||||
def unset(bot, update):
|
def unset(bot, update, job_queue):
|
||||||
"""Removes the job if the user changed their mind"""
|
"""Removes the job if the user changed their mind"""
|
||||||
chat_id = update.message.chat_id
|
chat_id = update.message.chat_id
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ def main():
|
||||||
dp.add_handler(CommandHandler("start", start))
|
dp.add_handler(CommandHandler("start", start))
|
||||||
dp.add_handler(CommandHandler("help", start))
|
dp.add_handler(CommandHandler("help", start))
|
||||||
dp.add_handler(CommandHandler("set", set, pass_args=True, pass_job_queue=True))
|
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
|
# log all errors
|
||||||
dp.add_error_handler(error)
|
dp.add_error_handler(error)
|
||||||
|
|
Loading…
Reference in a new issue