Add character limit to descriptions. Closes #14

This commit is contained in:
Ske
2018-09-07 17:40:02 +02:00
parent 16173e428b
commit 5930f490ce
2 changed files with 8 additions and 0 deletions

View File

@@ -59,6 +59,10 @@ async def system_set(ctx: CommandContext):
if ctx.has_next():
value = ctx.remaining()
# Sanity checking
if prop == "description":
if len(value) > 1024:
return CommandError("You can't have a description longer than 1024 characters.")
if prop == "tag":
if len(value) > 32:
return CommandError("You can't have a system tag longer than 32 characters.")