diff --git a/xmppbot.py b/xmppbot.py index d93e0eb..a789267 100644 --- a/xmppbot.py +++ b/xmppbot.py @@ -33,10 +33,10 @@ class BudgetBot(object): reply = "Invalid budget name" else: reply = "Budget *{}*\n".format(budget[0]['name']) - reply += " Available current month: {:.2f}".format(budget.get('limit')) - reply += " Average per day: {:.2f}".format(budget.get('average_per_day')) + reply += " Available current month: {:.2f}".format(budget[0].get('limit')) + reply += " Average per day: {:.2f}".format(budget[0].get('average_per_day')) reply += " Spent: {:.2f}\n".format(budget[0].get('spent')) - reply += " Spent per day: {:.2f}".format(budget.get('spent_per_day')) + reply += " Spent per day: {:.2f}".format(budget[0].get('spent_per_day')) reply += " Remaining: {:.2f}\n".format(budget[0].get('remaining')) reply += " Remaining per day: {:.2f}".format(budget[0].get('remaining_per_day')) else: