diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-09 16:05:42 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-09 16:51:15 +0100 |
| commit | 080b3f81df692fc0761353814c629ace53f0e3c9 (patch) | |
| tree | 6db19e375a4cc26b8b374e5c2fcb77730c6f66ad | |
| parent | c83f6dcb413446d5abae31bceda0c550bb55b4d7 (diff) | |
| download | geldschieberbot-080b3f81df692fc0761353814c629ace53f0e3c9.tar.gz geldschieberbot-080b3f81df692fc0761353814c629ace53f0e3c9.zip | |
fix function name and formatting
| -rw-r--r-- | geldschieberbot.py | 8 |
1 files changed, 4 insertions, 4 deletions
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] |
