discord

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMuteDeaf

func ApplyMuteDeaf(sess *discordgo.Session, guildID, userID string, mute, deaf bool) error

func BotTokenIdentifyKey

func BotTokenIdentifyKey(token string) string

func BotTokenIdentifyLockKey

func BotTokenIdentifyLockKey(token string) string

func BroadcastTaskAckKey

func BroadcastTaskAckKey(taskID string) string

func CompleteTaskAckKey

func CompleteTaskAckKey(taskID string) string

func IsTokenLocked

func IsTokenLocked(client *redis.Client, token string) bool

func IsTokenLockedOut

func IsTokenLockedOut(client *redis.Client, token string, thres IdentifyThresholds) bool

func MarkIdentifyAndLockForToken

func MarkIdentifyAndLockForToken(client *redis.Client, token string)

func TasksSubscribeKey

func TasksSubscribeKey(connectCode string) string

func WaitForToken

func WaitForToken(client *redis.Client, token string)

Types

type IdentifyThresholds

type IdentifyThresholds struct {
	HardWindow    time.Duration
	HardThreshold int64

	SoftWindow    time.Duration
	SoftThreshold int64
}

type ModifyTask

type ModifyTask struct {
	GuildID    uint64            `json:"guildID"`
	UserID     uint64            `json:"userID"`
	Parameters NoNickPatchParams `json:"parameters"`
	TaskID     string            `json:"taskID"`
}

func NewModifyTask

func NewModifyTask(guildID, userID uint64, params NoNickPatchParams) ModifyTask

type MuteDeafenSuccessCounts

type MuteDeafenSuccessCounts struct {
	Worker   int64 `json:"worker"`
	Capture  int64 `json:"capture"`
	Official int64 `json:"official"`
}

a response indicating how the mutes/deafens were issued

type NoNickPatchParams

type NoNickPatchParams struct {
	Deaf bool `json:"deaf"`
	Mute bool `json:"mute"`
}

Jump to

Keyboard shortcuts

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