Show dice format error when regex doesn't match

This commit is contained in:
jesopo 2019-09-26 14:32:20 +01:00
parent ab51bbaefa
commit c5b9a13b53

View file

@ -45,3 +45,5 @@ class Module(ModuleManager.BaseModule):
results_str = ", ".join(str(r) for r in results) results_str = ", ".join(str(r) for r in results)
event["stdout"].write("Rolled %s and got %s%s" % ( event["stdout"].write("Rolled %s and got %s%s" % (
roll, results_str, total)) roll, results_str, total))
else:
event["stderr"].write("Invalid format. Example: 2d12+2")