handle case of negative values of seconds

This commit is contained in:
Karan Sharma 2016-01-05 19:06:28 +05:30
parent 4197400853
commit 14a9962296

View file

@ -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!')