forked from pothtonswer/discordmuffin
Renamed RateLimited to RateLimit
This is more consistant with other event names.
This commit is contained in:
parent
098d7861a4
commit
38c51ce788
2 changed files with 3 additions and 3 deletions
|
@ -50,8 +50,8 @@ type Connect struct{}
|
|||
// Disconnect is an empty struct for an event.
|
||||
type Disconnect struct{}
|
||||
|
||||
// RateLimited is a struct for the RateLimited event
|
||||
type RateLimited struct {
|
||||
// RateLimit is a struct for the RateLimited event
|
||||
type RateLimit struct {
|
||||
*TooManyRequests
|
||||
URL string
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ func (s *Session) request(method, urlStr, contentType string, b []byte) (respons
|
|||
return
|
||||
}
|
||||
s.log(LogInformational, "Rate Limiting %s, retry in %d", urlStr, rl.RetryAfter)
|
||||
s.handle(RateLimited{TooManyRequests: &rl, URL: urlStr})
|
||||
s.handle(RateLimit{TooManyRequests: &rl, URL: urlStr})
|
||||
|
||||
mu.Lock()
|
||||
time.Sleep(rl.RetryAfter)
|
||||
|
|
Loading…
Reference in a new issue