From c5b9a13b53d7b55c9194e94b6c011acc8aa7b04b Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 26 Sep 2019 14:32:20 +0100 Subject: [PATCH] Show dice format error when regex doesn't match --- modules/dice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/dice.py b/modules/dice.py index 464d98d1..4a587d72 100644 --- a/modules/dice.py +++ b/modules/dice.py @@ -45,3 +45,5 @@ class Module(ModuleManager.BaseModule): results_str = ", ".join(str(r) for r in results) event["stdout"].write("Rolled %s and got %s%s" % ( roll, results_str, total)) + else: + event["stderr"].write("Invalid format. Example: 2d12+2")