You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to fetch all current members in voice channel.
At first, all priveleged intents was enabled in discord web interface. Bot added to guild as admin.
Second, bot.Identify.Intents = discordgo.IntentsAll was enabled.
Using voicestate update, seems impossible to get channel members with every approach I know
func voiceStateUpdate(s *discordgo.Session, v *discordgo.VoiceStateUpdate) {
...
ch, _ := s.State.Channel(v.ChannelID) //members len 0 cap 0
ch2, _ := s.Channel(v.ChannelID) //members len 0 cap 0
g, _ := s.State.Guild(v.GuildID)
cha := g.Channels //members in specific channel (lookup on breakpoint) still len 0 cap 0
...
so, where should be an issue and are there different approaches exist?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to fetch all current members in voice channel.
At first, all priveleged intents was enabled in discord web interface. Bot added to guild as admin.
Second,
bot.Identify.Intents = discordgo.IntentsAll
was enabled.Using voicestate update, seems impossible to get channel members with every approach I know
so, where should be an issue and are there different approaches exist?
Beta Was this translation helpful? Give feedback.
All reactions