From 080b3f81df692fc0761353814c629ace53f0e3c9 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 9 Nov 2017 16:05:42 +0100 Subject: fix function name and formatting --- geldschieberbot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'geldschieberbot.py') diff --git a/geldschieberbot.py b/geldschieberbot.py index bd20e11..4666acc 100644 --- a/geldschieberbot.py +++ b/geldschieberbot.py @@ -194,7 +194,7 @@ def handle_input(inp): sender = num2name[sender_number] try: - amount = to_cents(amount) + amount = to_cent(amount) except: send("ERROR: amount musst be a number") continue @@ -211,7 +211,7 @@ def handle_input(inp): p_balance = balance[sender][recipient] - send("New Balance: {0} {1} {2:.2} {3}\n".format(sender, + send("New Balance: {} {} {} {}\n".format(sender, ("->" if p_balance > 0 else "<-"), to_euro(abs(p_balance)), recipient)) @@ -221,7 +221,7 @@ def handle_input(inp): send('ERROR: !tanken not in form "!tanken amount person [info]"') continue try: - amount = to_cents(w[1]) + amount = to_cent(w[1]) except: send("ERROR: amount musst be a number") continue @@ -238,7 +238,7 @@ def handle_input(inp): msg = "" for p in parts.items(): - msg += p[0] + ": {}km = {:.2}\n".format(p[1][0], p[1][1]) + msg += p[0] + ": {}km = {}\n".format(p[1][0], p[1][1]) if p[0] != recipient: if p[0] in name2num: balance[recipient][p[0]] -= p[1][1] -- cgit v1.2.3