So that it can be happy now.
# Hunt/Puzzle IDs are restricted to lowercase letters, numbers, and underscores
valid_id_re = r'^[_a-z0-9]+$'
# Hunt/Puzzle IDs are restricted to lowercase letters, numbers, and underscores
valid_id_re = r'^[_a-z0-9]+$'
+lambda_ok = {'statusCode': 200}
+
def bot_reply(message):
"""Construct a return value suitable for a bot reply
def bot_reply(message):
"""Construct a return value suitable for a bot reply
if (result['ok']):
submission_handlers[result['view']['id']] = new_hunt_submission
if (result['ok']):
submission_handlers[result['view']['id']] = new_hunt_submission
- return {
- 'statusCode': 200,
- 'body': 'OK'
- }
actions['button'] = {"new_hunt": new_hunt}
actions['button'] = {"new_hunt": new_hunt}
# Invite the initiating user to the channel
turb.slack_client.conversations_invite(channel=channel_id, users=user_id)
# Invite the initiating user to the channel
turb.slack_client.conversations_invite(channel=channel_id, users=user_id)
- return {
- 'statusCode': 200,
- }
def view_submission(turb, payload):
"""Handler for Slack interactive view submission
def view_submission(turb, payload):
"""Handler for Slack interactive view submission
else:
turb.slack_client.chat_postMessage(channel=channel_id, text=result)
else:
turb.slack_client.chat_postMessage(channel=channel_id, text=result)
- return {
- 'statusCode': 200,
- 'body': ""
- }
if (result['ok']):
submission_handlers[result['view']['id']] = puzzle_submission
if (result['ok']):
submission_handlers[result['view']['id']] = puzzle_submission
- return {
- 'statusCode': 200
- }
commands["/puzzle"] = puzzle
commands["/puzzle"] = puzzle
- return {
- 'statusCode': 200
- }
# XXX: This duplicates functionality eith events.py:set_channel_description
def set_channel_topic(turb, puzzle):
# XXX: This duplicates functionality eith events.py:set_channel_description
def set_channel_topic(turb, puzzle):
set_channel_topic(turb, puzzle)
set_channel_topic(turb, puzzle)
commands["/state"] = state
commands["/state"] = state