Fix emote-only crash with rcauto, closes #33
This commit is contained in:
parent
6875acde72
commit
27f5730a90
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,9 @@ class UtilCog(commands.Cog):
|
||||||
)
|
)
|
||||||
async def _rcauto(self, ctx: SlashContext, text: str):
|
async def _rcauto(self, ctx: SlashContext, text: str):
|
||||||
to_send = ""
|
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():
|
for letter in text.upper():
|
||||||
if letter == " ":
|
if letter == " ":
|
||||||
to_send += " "
|
to_send += " "
|
||||||
|
|
Loading…
Add table
Reference in a new issue