Skip to content

Channel ID in Voice Leave event #357

Closed Answered by topi314
kvizyx asked this question in Help
Discussion options

You must be logged in to vote

Discord always sends the current channel a user would join
nil means they left.

To see how many users are in a voice channel you'd either need to track all voice states which can be done by adding

client, err := disgo.New(...,
 bot.WithCacheConfigOpts(
  cache.WithCaches(cache.FlagVoiceStates)
 )
)

Then you can just access all members in a voice channel via

client.Caches().AudioChannelMembers(channel)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kvizyx
Comment options

Answer selected by kvizyx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #356 on May 12, 2024 12:32.