Check that a user is updating an existing badge (badges.py)
This commit is contained in:
parent
ebc835e6d5
commit
be7ae375ca
1 changed files with 3 additions and 0 deletions
|
@ -127,6 +127,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
found_badge = badge_name
|
found_badge = badge_name
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if not found_badge:
|
||||||
|
raise utils.EventError("You have no '%s' badge" % badge)
|
||||||
|
|
||||||
value = event["args_split"][-1]
|
value = event["args_split"][-1]
|
||||||
if value.lower() == "today":
|
if value.lower() == "today":
|
||||||
value = self._now()
|
value = self._now()
|
||||||
|
|
Loading…
Reference in a new issue