voicestate

package
v0.0.0-...-c01e7cb Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

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

func NewTracker

func NewTracker() *Tracker

NewTracker returns a new voice state tracker.

func (*Tracker) Register

func (t *Tracker) Register(gw disgord.GatewayQueryBuilder)

Register should be used before the connection is established. Registers the necessary handlers for tracking voice state changes.

func (*Tracker) States

func (t *Tracker) States(guildID disgord.Snowflake) (states []*disgord.VoiceState)

States returns the full list of known voice states for a given guild.

func (*Tracker) UserCount

func (t *Tracker) UserCount(guildID disgord.Snowflake) map[disgord.Snowflake]int

UserCount returns a map where the keys are channels that have active voice states, and the value is the number of users in that voice channel, for a given guild.

Jump to

Keyboard shortcuts

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