Closed averrin closed 6 years ago
You can't, for example if you try to do that with an other discord official client it will say you that's you are already connected from an other location, so you can connect multiple time to the gateway, but you can connect only one time to the voice server (which is used by your other client).
So, for detecting speaking events i have no other way but connecting to this channel as bot?
I think there is a way with RPC. You need to connect via RPC your application to your Client, and from there you can get the Speaking event of your current voice server. That what XSplit and OBS do to display if someone is speaking or not in the streaming overlay. The difference is that this method will use your current client to get all the information instead of an other connection to discord. However for now RPC communication is in private beta so i'm not sure that you can use it.
For detecting when other users are speaking:
g, err := session.State.Guild(guildID) if err != nil { return err }
g.VoiceStates // <- look at this
On Sun, Jun 25, 2017 at 4:56 AM, robbix1206 notifications@github.com wrote:
I think there is a way with RPC. You need to connect vie RPC an application to your Client, and from there you can get the Speaking event of your current voice server. That what XSplit and OBS do to display if someone is speaking or not in the streaming overlay. However for now RPC communication is in private beta so i'm not sure that you can use it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bwmarrin/discordgo/issues/395#issuecomment-310898503, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdVglMwvYU1_UEiFpjuOAbyAlzkXAWyks5sHkrrgaJpZM4OEae5 .
VoiceState have no Speaking flag. And I think I cannot add handler for this, due to its other connection with nil as voiceConnections. Variant with bot is working, but it has some other difficulties.
I'm unsure what difficulties you're still having :(. Can you give a list or maybe just hop on the Discord Gophers chat (see README)? It might be easier to help you there where we can have a conversation about what you're trying to do and what isn't working.
@averrin Did you find the answer to your problem?
@robbix1206 im still waiting for rpc. But as working solution: use password for creating bot and relogin as bot for connecting to same channel and handle events. Ugly but works.
Hi. I want add handler to current voice connection, but i cant understand how i can do it. When i authorized as bot i can join to voice channel and get connection as result, but when i connecting with email and password, and my user connects from other client i want to get current voice connection.
Update: Why i want this? I need handle speaking events but i dont want use bot for this. Can i did it without joining to voice channel from my code?