diff --git a/slack_export.py b/slack_export.py index 0084ad5..a64cc3f 100644 --- a/slack_export.py +++ b/slack_export.py @@ -22,6 +22,7 @@ def getHistory(pageableObject, channelId, pageSize = 100): lastTimestamp = None while(True): + sleep(1) # Respect the Slack API rate limit response = pageableObject.history( channel = channelId, latest = lastTimestamp, @@ -33,7 +34,6 @@ def getHistory(pageableObject, channelId, pageSize = 100): if (response['has_more'] == True): lastTimestamp = messages[-1]['ts'] # -1 means last element in a list - sleep(1) # Respect the Slack API rate limit else: break