diff options
| author | 2018-09-01 10:52:04 +0100 | |
|---|---|---|
| committer | 2018-09-01 10:52:04 +0100 | |
| commit | 0a96a79077d82de51533d914296b7a51ca19eb3b (patch) | |
| tree | b54e7e267afb46fab572cea0d78de44529b91ee1 /modules | |
| parent | Formatting request (#14) (diff) | |
| signature | ||
Cosmetic enhancement for ducks and dice.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/dice.py | 8 | ||||
| -rw-r--r-- | modules/ducks.py | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/modules/dice.py b/modules/dice.py index 9862b172..2829cf48 100644 --- a/modules/dice.py +++ b/modules/dice.py @@ -1,5 +1,5 @@ import random - +import Utils class Module(object): def __init__(self, bot, events): @@ -38,6 +38,6 @@ class Module(object): total = sum(results) results = ', '.join(map(str, results)) - event["stdout"].write("Rolled " + str_roll + " for a total " - + "of " + str(total) - + ": [" + results + "]") + event["stdout"].write("Rolled " + Utils.bold(str_roll) + " for a total " + + "of " + Utils.bold(str(total)) + + ": " + results) diff --git a/modules/ducks.py b/modules/ducks.py index fac698f1..e50cc055 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -1,6 +1,6 @@ from operator import itemgetter from threading import Timer -import datetime +import Utils import random @@ -197,9 +197,10 @@ class Module(object): grammar = "" if befriended_ducks == 0 else "s" event["stdout"].write( - target + ", you've befriended " + str( - befriended_ducks + 1) + " duck" + grammar + " in " + event[ - "target"].name) + target + ", you've befriended " + Utils.bold(str( + befriended_ducks + 1)) + " duck" + grammar + " in " + + Utils.bold(event[ + "target"].name)) self.duck_loop_entry(event) @@ -225,9 +226,10 @@ class Module(object): grammar = "" if shot_ducks == 0 else "s" event["stdout"].write( - target + ", you've shot " + str( - shot_ducks + 1) + " duck" + grammar + " in " + event[ - "target"].name) + target + ", you've shot " + + Utils.bold(str(shot_ducks + 1)) + " duck" + + grammar + " in " + + Utils.bold(event["target"].name)) self.duck_loop_entry(event) |
