From 2f1a34852ed38adcc996a5cf85e8f70aa08036e8 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Mon, 13 May 2019 14:33:33 -0400 Subject: [PATCH] add notification when rate limit reached --- ephemetoot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ephemetoot.py b/ephemetoot.py index ca61cf8..f96a08f 100644 --- a/ephemetoot.py +++ b/ephemetoot.py @@ -79,6 +79,8 @@ def checkToots(timeline, deleted_count=0): time.sleep( 2 ) # wait 2 secs between deletes to be a bit nicer to the server + if mastodon.ratelimit_remaining == 0: + print("Rate limit reached. Waiting for a rate limit reset...") if not options.test: mastodon.status_delete(toot) except MastodonError as e: