mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Merge pull request #148 from mr-karan/patch-1
handle case of negative values of seconds
This commit is contained in:
commit
fc64cc0a4a
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