Skip to content

Commit

Permalink
Merge pull request #104 from ritsec/95-have-the-users-username-next-t…
Browse files Browse the repository at this point in the history
…o-the-userid-in-the-query

added delay to username call
  • Loading branch information
c0untingNumbers authored Apr 27, 2024
2 parents cad359f + 58ae23c commit deb3936
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions commands/slash/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ func Query() (*discordgo.ApplicationCommand, func(s *discordgo.Session, i *disco
} else {
for x, signin := range signins {
user, err := s.User(signin.Key)

// wait 2s for every 10 users
if x > 0 && x%10 == 0 {
time.Sleep(2 * time.Second)
}

if err != nil {
logging.Error(s, err.Error(), i.Member.User, span, logrus.Fields{"error": err})
return
Expand Down

0 comments on commit deb3936

Please sign in to comment.