From 27f5730a90df536ba7f519b0604a014a667e6ab7 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Tue, 6 Jul 2021 20:23:36 -0600 Subject: [PATCH] Fix emote-only crash with rcauto, closes #33 --- jarvis/cogs/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jarvis/cogs/util.py b/jarvis/cogs/util.py index 5f0674c..6c859c2 100644 --- a/jarvis/cogs/util.py +++ b/jarvis/cogs/util.py @@ -72,6 +72,9 @@ class UtilCog(commands.Cog): ) async def _rcauto(self, ctx: SlashContext, text: str): to_send = "" + if len(text) == 1 and not re.match(r"^[A-Z0-9-()$@!?^'#. ]$", text): + await ctx.send("Please use ASCII characters.") + return for letter in text.upper(): if letter == " ": to_send += " "