diff options
| author | 2018-12-20 20:48:28 +0000 | |
|---|---|---|
| committer | 2018-12-20 20:48:28 +0000 | |
| commit | e010d21e4cb546e03c7406310feca3d35c2b053a (patch) | |
| tree | 2525ab51db7f1e9d4d24196583f14f81f7ce3a68 | |
| parent | actually hook in to command for !resetbadge, format datetime to string before (diff) | |
| signature | ||
year/month/day should be an int (badges.py)
| -rw-r--r-- | modules/badges.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/badges.py b/modules/badges.py index 286ba1fc..02e729bd 100644 --- a/modules/badges.py +++ b/modules/badges.py @@ -112,7 +112,10 @@ class Module(ModuleManager.BaseModule): raise utils.EventError("Invalid date format, please use %s" % HUMAN_FORMAT_HELP) value = datetime.datetime( - year=match.group(1), month=match.group(2), day=match.group(3)) + year=int(match.group(1)), + month=int(match.group(2)), + day=int(match.group(3)) + ) badges[found_badge] = self._format_datetime(value) self._set_badges(event["user"], badges) |
