galactus

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAckFromClientBotTimeout = time.Second * 2
View Source
const DefaultBroadcastToClientBotTimeout = time.Second

Variables

View Source
var DefaultIdentifyThresholds = discord.IdentifyThresholds{
	HardWindow:    time.Hour * 24,
	HardThreshold: 950,
	SoftWindow:    time.Hour * 12,
	SoftThreshold: 500,
}
View Source
var PremiumBotConstraints = map[int16]int{
	0: 0,
	1: 0,
	2: 1,
	3: 3,
	4: 10,
	5: 100,
}
View Source
var UnresponsiveCaptureBlacklistDuration = time.Minute * time.Duration(1)

Functions

This section is empty.

Types

type TokenProvider

type TokenProvider struct {
	// contains filtered or unexported fields
}

func NewTokenProvider

func NewTokenProvider(botToken, redisAddr, redisUser, redisPass string, maxReq int64) *TokenProvider

func (*TokenProvider) BlacklistTokenForDuration

func (tokenProvider *TokenProvider) BlacklistTokenForDuration(guildID, hashToken string, duration time.Duration) error

func (*TokenProvider) Close

func (tokenProvider *TokenProvider) Close()

func (*TokenProvider) IncrAndTestGuildTokenComboLock

func (tokenProvider *TokenProvider) IncrAndTestGuildTokenComboLock(guildID, hashToken string) bool

func (*TokenProvider) PopulateAndStartSessions

func (tokenProvider *TokenProvider) PopulateAndStartSessions()

func (*TokenProvider) Run

func (tokenProvider *TokenProvider) Run(port string)

type UserModify

type UserModify struct {
	UserID uint64 `json:"userID"`
	Mute   bool   `json:"mute"`
	Deaf   bool   `json:"deaf"`
}

type UserModifyRequest

type UserModifyRequest struct {
	Premium int16        `json:"premium"`
	Users   []UserModify `json:"users"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL