aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-16 00:05:29 +0000
committerGravatar jesopo2020-02-16 00:05:29 +0000
commitba1806007b0266055a48cd4949642098ac36ddb2 (patch)
treed75e631e295ed8c6fc8fd789224216509bbc70f3 /modules
parentfix _set_modifier typing (diff)
signature
accept 'today' as well as 'now' for badges
Diffstat (limited to 'modules')
-rw-r--r--modules/badges.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/badges.py b/modules/badges.py
index 909a98f1..a6d76ee5 100644
--- a/modules/badges.py
+++ b/modules/badges.py
@@ -31,7 +31,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.command.badge")
@utils.kwarg("help", "List, add and remove badges")
@utils.spec("!'list ?<nickname>ouser")
- @utils.spec("!'add !<name>marginstring !'now")
+ @utils.spec("!'add !<name>marginstring !'now,today")
@utils.spec("!'add !<name>marginstring !date")
@utils.spec("!'remove !<name>string")
def badge(self, event):
@@ -56,7 +56,7 @@ class Module(ModuleManager.BaseModule):
else:
badges = self._get_badges(event["user"])
if event["spec"][0] == "add":
- if event["spec"][2] == "now":
+ if event["spec"][2] in ["now", "today"]:
dt = utils.datetime.utcnow()
else:
dt = event["spec"][2]