From ba1806007b0266055a48cd4949642098ac36ddb2 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 16 Feb 2020 00:05:29 +0000 Subject: [PATCH] accept 'today' as well as 'now' for badges --- modules/badges.py | 4 ++-- 1 file 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 ?ouser") - @utils.spec("!'add !marginstring !'now") + @utils.spec("!'add !marginstring !'now,today") @utils.spec("!'add !marginstring !date") @utils.spec("!'remove !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]