[O] Validate name length

This commit is contained in:
Hykilpikonna
2020-11-27 11:38:05 -05:00
parent feb0ce6463
commit e4e5f6d0dc
+2
View File
@@ -83,6 +83,8 @@ def touch(update: Update, context: CallbackContext):
# Validate name # Validate name
name = context.args[0] name = context.args[0]
if len(name) > 16:
return "*Error:* Please use a shorter name."
if not name.isalnum(): if not name.isalnum():
return "*Error:* You can only use alphanumeric names!" return "*Error:* You can only use alphanumeric names!"