mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
handle case of negative values of seconds
This commit is contained in:
parent
4197400853
commit
14a9962296
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ def set(bot, update, args):
|
|||
try:
|
||||
# args[0] should contain the time for the timer in seconds
|
||||
due = int(args[0])
|
||||
|
||||
if due < 0:
|
||||
bot.sendMessage(chat_id,text='Sorry we can not go back to future!')
|
||||
def alarm(bot):
|
||||
""" Inner function to send the alarm message """
|
||||
bot.sendMessage(chat_id, text='Beep!')
|
||||
|
|
Loading…
Reference in a new issue