fixed 500

master
justcool393 2022-11-06 23:59:49 -06:00
parent 0178ea8249
commit ee4c534a92
1 changed files with 2 additions and 0 deletions

View File

@ -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 "<img" in repl else repl.upper()
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):