commands = {}
submission_handlers = {}
-# Hunt and Puzzle IDs are restricted to letters, numbers, and underscores
-valid_id_re = r'^[_a-zA-Z0-9]+$'
+# Hunt/Puzzle IDs are restricted to lowercase letters, numbers, and underscores
+valid_id_re = r'^[_a-z0-9]+$'
def bot_reply(message):
"""Construct a return value suitable for a bot reply
# Validate that the hunt_id contains no invalid characters
if not re.match(valid_id_re, hunt_id):
return submission_error("hunt_id",
- "Hunt ID can only contain letters, "
+ "Hunt ID can only contain lowercase letters, "
+ "numbers, and underscores")
# Check to see if the hunts table exists
# Validate that the puzzle_id contains no invalid characters
if not re.match(valid_id_re, puzzle_id):
return submission_error("puzzle_id",
- "Puzzle ID can only contain letters, "
+ "Puzzle ID can only contain lowercase letters, "
+ "numbers, and underscores")
# Create a channel for the puzzle