Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't detect speaking state #1375

Open
OmegaRogue opened this issue May 3, 2023 · 1 comment · May be fixed by #1590
Open

Can't detect speaking state #1375

OmegaRogue opened this issue May 3, 2023 · 1 comment · May be fixed by #1590

Comments

@OmegaRogue
Copy link

I'm trying to make a discord bot for integration with some other software where i need to know if a user in a voicechannel is speaking, but when i add a handler to the voice connection, it only ever gets called the first time i start talking after joining the channel

v, err := dg.ChannelVoiceJoin(guildId, channelId), false, false)
if err != nil {
	fmt.Println("failed to join voice channel:", err)
	return
}
v.AddHandler(func(vc *discordgo.VoiceConnection, vs *discordgo.VoiceSpeakingUpdate) {
	foo := " not"
	if vs.Speaking {
		foo = ""
	}
	vc.Debug = true
	log.Info().Msgf("User %s is%s speaking", vs.UserID, foo)
})
@jacob7395
Copy link

I'm having the same issue, did you find a solution?

@raa0121 raa0121 linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants