Merge pull request #148 from mr-karan/patch-1

handle case of negative values of seconds
This commit is contained in:
Jannes Höke 2016-01-05 14:37:26 +01:00
commit fc64cc0a4a

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