Documentation ¶
Index ¶
Constants ¶
View Source
const ExtraDelay = 250 * time.Millisecond
ExtraDelay because Discord is trash. I've seen this in both litcord and discordgo, with dgo claiming from experiments. RE: Those who want others to fix it for them: release the source code then.
Variables ¶
View Source
var ErrTimedOutEarly = errors.New("rate: rate limit exceeds context deadline")
ErrTimedOutEarly is the error returned by Limiter.Acquire, if a rate limit exceeds the deadline of the context.Context.
View Source
var MajorRootPaths = []string{"channels", "guilds"}
TODO: webhook
Functions ¶
func ParseBucketKey ¶
func StringIsCustomEmoji ¶
func StringIsEmojiOnly ¶
Types ¶
type CustomRateLimit ¶
type Limiter ¶
type Limiter struct { // Only 1 per bucket CustomLimits []*CustomRateLimit Prefix string // contains filtered or unexported fields }
func NewLimiter ¶
Click to show internal directories.
Click to hide internal directories.