Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VoiceStateEvent ¶
type VoiceStateEvent struct { Type VoiceStateEventType GuildID string ChannelID string UserID string OriginalUpdate *discordgo.VoiceStateUpdate }
VoiceStateEvent is adapted from a VoiceStateUpdate received from discordgo. It is enhanced with a cache. It makes the nature of events much more clear to the consumer. It also handles channel moves seamlessly, converting them to separate leave and join events.
type VoiceStateEventQueue ¶
type VoiceStateEventQueue struct { Out chan *VoiceStateEvent // contains filtered or unexported fields }
func NewVoiceStateEventQueue ¶
func NewVoiceStateEventQueue(c chan *VoiceStateEvent) *VoiceStateEventQueue
func (*VoiceStateEventQueue) Handler ¶
func (q *VoiceStateEventQueue) Handler(s *discordgo.Session, e *discordgo.VoiceStateUpdate)
type VoiceStateEventType ¶
type VoiceStateEventType int
const ( // A user has joined a voice channel. VoiceChannelJoin VoiceStateEventType = iota // A user has left a tracked voice channel. VoiceChannelLeave // A user has left an untracked channel. ChannelID will not be available, but GuildID still will be. VoiceChannelLeaveUnknownChannel // A user has changed a setting (eg. mute) without switching channels. VoiceChannelSettingUpdate )
Click to show internal directories.
Click to hide internal directories.