Skip to content

Commit

Permalink
Misc fixes
Browse files Browse the repository at this point in the history
- fixes #2
- fixes #3
  • Loading branch information
igor.tsupko committed Oct 1, 2018
1 parent 7687158 commit f6e0abd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ def got_reply_on_cron(message):

markup = telebot.types.ReplyKeyboardMarkup()
for balance in balances:
markup.row(telebot.types.KeyboardButton('took '+str(balance_diff)+' from '+str(balance)))
markup.row(telebot.types.KeyboardButton('took '+str(abs(balance_diff))+' from '+str(balance)))
bot.reply_to(message, MESSAGES["where_did_you_get_money"], reply_markup=markup)
elif message_integer < current_balance:
bot.send_message(message.chat.id, "You have spent "+str(abs(balance_diff))+".")
_talk_about_spent_money(message, message_number=str(abs(balance_diff)))
else:
bot.send_message(message.chat.id, "You have spent "+str(balance_diff)+".")
_talk_about_spent_money(message, message_number=str(balance_diff))
bot.send_message(message.chat.id, "Nothing changed. Thanks for info!")
except Exception as err:
print(err)

Expand Down

0 comments on commit f6e0abd

Please sign in to comment.