]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Remove code (previously disabled) to invite users to new puzzle channel
[turbot] / turbot / interaction.py
index 31d554942f580d11566ddfb9b91b15122e865c5a..b6fa7d7e12efc8cfd5c4809d3ea5ee91ef98413b 100644 (file)
@@ -1,5 +1,6 @@
 from slack.errors import SlackApiError
 from turbot.blocks import input_block, section_block, text_block
+from turbot.hunt import find_hunt_for_hunt_id
 import turbot.rot
 import turbot.sheets
 import turbot.slack
@@ -286,23 +287,6 @@ def channel_is_hunt(turb, channel_id):
 
     return response['Items'][0]
 
-def find_hunt_for_hunt_id(turb, hunt_id):
-    """Given a hunt ID find the database for for that hunt
-
-    Returns None if hunt ID is not found, otherwise a
-    dictionary with all fields from the hunt's row in the table,
-    (channel_id, active, hunt_id, name, url, sheet_url, etc.).
-
-    """
-    turbot_table = turb.db.Table("turbot")
-
-    response = turbot_table.get_item(Key={'hunt_id': hunt_id})
-
-    if 'Item' in response:
-        return response['Item']
-    else:
-        return None
-
 def find_hunt_for_channel(turb, channel_id, channel_name):
     """Given a channel ID/name find the id/name of the hunt for this channel