Sleep between posts

This commit is contained in:
Daniel Mason 2021-09-01 22:47:01 +12:00
parent 7014904aa4
commit c109f08589
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -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)
}
}