From ee4c534a92e2686177c60ef904f852825a015b9e Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sun, 6 Nov 2022 23:59:49 -0600 Subject: [PATCH] fixed 500 --- files/helpers/regex.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index b1c60514d..c15e29ade 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -123,6 +123,8 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str], return match_str else: repl = replace_with[match_str.lower()] + if not isinstance(repl, str): + repl = random.choice(repl) return repl if not upper or "