1
0
Fork 0
mirror of synced 2024-05-29 00:39:39 +12:00

Ensure that message is given before checking for regex statement

This commit is contained in:
phxntxm 2017-06-28 05:03:36 -05:00
parent 94955be495
commit bca36e095b

View file

@ -534,7 +534,7 @@ class Administration:
parent = ctx.message.content.split()[0]
parent = parent[len(ctx.prefix):]
if re.search("{.*token.*}", msg):
if msg and re.search("{.*token.*}", msg):
await ctx.send("Illegal content in {} message".format(parent))
else:
entry = {