- # Invite those members to the puzzle channel (in chunks of 500)
- cursor = 0
- while cursor < len(members):
- turb.slack_client.conversations_invite(
- channel=puzzle_channel_id,
- users=members[cursor:cursor + 500])
- cursor += 500
+ turb.slack_client.chat_postMessage(
+ channel=channel_id,
+ text="New puzzle: {}".format(['name']),
+ blocks=[
+ section_block(text_block(welcome_msg)),
+ section_block(text_block(sheet_msg)),
+ section_block(text_block(state_msg)),
+ section_block(text_block(solved_msg))
+ ])
+
+ # Finally, finally, notify the hunt channel about the new puzzle
+ hunt = find_hunt_for_hunt_id(turb, puzzle['hunt_id'])
+ slack_send_message(
+ turb.slack_client, hunt['channel_id'],
+ "New puzzle available: <{}|{}>".format(
+ puzzle['channel_url'],
+ puzzle['name'])
+ )