discord

package
v1.2.2 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 added in v0.1.2

func BotTokenIdentifyKey(token string) string

func BotTokenIdentifyLockKey added in v0.1.2

func BotTokenIdentifyLockKey(token string) string

func BroadcastTaskAckKey

func BroadcastTaskAckKey(taskID string) string

func CompleteTaskAckKey

func CompleteTaskAckKey(taskID string) string

func IsTokenLocked added in v0.1.2

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

func IsTokenLockedOut added in v0.1.2

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

func MarkIdentifyAndLockForToken added in v0.1.2

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

func TasksSubscribeKey

func TasksSubscribeKey(connectCode string) string

func WaitForToken added in v0.1.2

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

Types

type IdentifyThresholds added in v0.1.2

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 added in v1.2.2

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