[Voice] How to get the number of users in a voice channel? v3 #314
-
Hi, using the v3 api I can use Is it possible to get the number of users in a voice channel based on the channel ID? The problem I'm trying to solve is that, if it's been 5 minutes since there's been zero users in the voice channel then I want to disconnect due to inactivity. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That would be Note that
|
Beta Was this translation helpful? Give feedback.
That would be
state.VoiceStates(discord.GuildID)
, which would give you a slice ofdiscord.VoiceState
instance that you can use to check if anyone's in any voice channel.Note that
VoiceStates
is part ofstore.VoiceStateStore
: