From c109f08589cf231c0b078fd405924531eefa5131 Mon Sep 17 00:00:00 2001 From: Daniel Mason Date: Wed, 1 Sep 2021 22:47:01 +1200 Subject: [PATCH] Sleep between posts --- internal/nzcovidbot/twitter.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/nzcovidbot/twitter.go b/internal/nzcovidbot/twitter.go index 1fce515..3e04049 100644 --- a/internal/nzcovidbot/twitter.go +++ b/internal/nzcovidbot/twitter.go @@ -2,6 +2,7 @@ package nzcovidbot import ( "log" + "time" "github.com/dghubble/go-twitter/twitter" "github.com/dghubble/oauth1" @@ -34,5 +35,8 @@ func postToTwitter() { if err != nil { log.Print(err) } + + // Lets not ratelimit ourselves :upsidedownsmiley: + time.Sleep(1 * time.Second) } }