Bruce Marriner
e76dafab78
Do spam unready session error on voice reconnec
2016-06-16 14:53:05 -05:00
Bruce Marriner
c8d01b7f60
Reconnect now does a full disconnect and reconnect
...
This should hopefully provide a more stable voice connection at the cost
of making reconnects slightly more expensive for both the client and
Discord. This could be changed later once the Discord voice
documentation more clearly defines reconnect rules. Also, a bit of cleanup :)
2016-06-14 10:57:43 -05:00
Bruce Marriner
71c172a948
Clean up.
2016-06-04 20:18:56 -05:00
Bruce Marriner
7039cc47dc
Reconnect to voice gateway instead of..
2016-05-28 14:58:44 -05:00
Bruce Marriner
32aa5718d1
Fix loop in voice reconnect
2016-05-28 10:50:18 -05:00
Bruce Marriner
754d64d339
Initial code to support voice reconnecting
...
Also includes some logging improvements and a small fix to track
speaking state and to send speaking packet if needed before sending
opus packets.
2016-05-26 19:35:17 -05:00
Harmon758
2175a62cad
Update deaf and mute as well
2016-05-25 10:41:18 -05:00
Harmon758
78113398e5
Update ChannelID in ChangeChannel
2016-05-25 10:04:38 -05:00
Bruce Marriner
aede29500f
Added entire voice struct for debugging
2016-05-03 09:35:59 -05:00
Bruce Marriner
cb9e30670f
no concurrent writes to voice ws, log cleanup
2016-05-01 19:54:28 -05:00
Bruce Marriner
dd69a7e27f
Added logging statements
2016-04-28 09:27:57 -05:00
Bruce Marriner
fc7ce3db94
Initial add of new logging system
...
This adds a LogLevel setting for both Websocket and VoiceConnections
that can be configured to set the specific log level desired. This
also adds a new logging function that adds additional helpful
information when printing out log messages.
2016-04-26 21:17:51 -05:00
Bruce Marriner
4cac19c3f9
Do not start udp listener if deaf.
...
If you call VoiceChannelJoin and set deaf to true
then the library will not start a udp listener
2016-04-25 22:00:30 -05:00
Bruce Marriner
6c0b89965c
slightly better handling of voice disconnects
...
We now check if the voice connection disconencted
due to a call to Voice.Close() and if so it does not
emit an error message.
2016-04-25 21:33:22 -05:00
Bruce Marriner
1a672823a2
Lint and Cleanup
2016-04-11 18:54:19 -05:00
jonas747
d1f25d8561
Changed fmt.Print to log.Print
2016-03-21 17:13:39 +01:00
Chris Rhodes
584b06aae5
Support VoiceSpeakingUpdates on VoiceConnection.
2016-03-18 10:50:25 -07:00
Bruce Marriner
7bbcfe7e0e
Add a timeout loop to voice open to wait for SessionID
...
This doesn't always in the same order I had been told. It is possible
that it will come slightly after open function is called so we need
to give it a few ms to come in before we open the voice websocket
connection. How this is done may change later to a channel :)
2016-03-18 07:58:01 -05:00
Bruce Marriner
9648705e77
Moving things around..
2016-03-17 16:15:59 -05:00
Bruce Marriner
b1ac010731
Unexported WaitUntilConnected
...
This isn't needed now that the ChannelVoiceJoin waits
for the connection before returning, or returns an error.
2016-03-17 15:57:40 -05:00
Bruce Marriner
513facf391
More cleanup, moving things around..
2016-03-17 15:54:07 -05:00
Bruce Marriner
cab4964d3a
Unexported OP2, no longer needed by dgvoice.
2016-03-17 14:43:19 -05:00
Bruce Marriner
3ffbbdcc56
Unexport UDPConn as it is no longer needed externally.
2016-03-17 14:39:55 -05:00
Bruce Marriner
55274d30bd
Removed Receive flag for now, for simplicity.
...
This can be re-eval'd later once the basic API is stable
2016-03-17 14:32:10 -05:00
Bruce Marriner
0c3d957330
Little cleanup, moved funcs around.
2016-03-17 14:30:58 -05:00
Bruce Marriner
397d04b1ff
Fix a couple bugs I just created.
2016-03-17 14:02:19 -05:00
Bruce Marriner
706fd1c03f
Separated Close into two functions, added deaf/mute to ChangeChannel
...
This is requried because if a guild changes it's voice region
while we're connected we need to take down the udp/ws connections
and re-connect without disconnecting from the voice channel.
2016-03-17 13:34:15 -05:00
Bruce Marriner
50cc4df965
Some, slightly messy, fixes to get voice -working-.
2016-03-11 23:19:35 -06:00
andrei
cf222be2f8
Cleanup voice connection on close
2016-03-08 10:47:41 -08:00
andrei
5dc0b9f2a1
Add connect timeout, fix ChannelVoiceJoin "leaking" connections
2016-03-08 02:36:00 -08:00
andrei
b48e8c992e
Track voice state changes, expose stuff, add channel changing
2016-03-07 15:41:02 -08:00
andrei
1fc0e2053b
Add support for multiple voice connections
...
With the upcoming API changes, Discord will be allowing bot users to be
onnected to more than one voice channel at a time. This commit is a
first stab at implementing that functionality in discordgo.
Voice works pretty good right now, ideally the next step is to cleanup
some of the channel-spam and weird blocking-spots.
2016-03-05 01:05:18 -08:00
Bruce Marriner
85e06e3e83
Encrypt / Decrypt Voice packets, closes #133
2016-02-24 23:27:56 -06:00
Bruce Marriner
a9306fda00
Removed unreachable return
2016-02-20 17:42:10 -06:00
Bruce Marriner
f832d3da4a
Fix so opusSender exits better on close, closes #123
2016-02-19 16:09:16 -06:00
Bruce Marriner
548d61c406
Add ability to cleaned close voice websocket and udp connections
2016-02-18 21:41:37 -06:00
Bruce Marriner
02a6e04b47
Spelling
2016-02-04 11:36:57 -06:00
Bruce Marriner
8023a80e0b
Add comment to Packet type
2016-02-01 09:13:59 -06:00
Bruce Marriner
68308c6f97
Added opusReceiver.
2016-01-31 16:57:50 -06:00
Bruce Marriner
b4b144edb3
Renamed Opus chan to OpusSend and added OpusRecv
2016-01-31 14:08:33 -06:00
Bruce Marriner
edc09778a7
Linting.
2016-01-28 08:36:09 -06:00
Bruce Marriner
9c5cd00d34
Spelling.
2016-01-27 23:31:43 -06:00
Bruce Marriner
99351beaf0
Set Voice.Ready to False when opusSender exits :)
2016-01-27 10:16:10 -06:00
Bruce Marriner
7a7848d7ff
Set Voice.Ready to false when opusSender exits
2016-01-27 10:14:53 -06:00
Bruce Marriner
7cc7b09957
Moved Voice.Ready = true into opusSender
2016-01-26 21:42:37 -06:00
Bruce Marriner
4b1baec757
Added opusSender func
2016-01-26 20:22:01 -06:00
Bruce Marriner
c10cdccf22
Add initial block for Voice OP5
2016-01-12 08:15:32 -06:00
Bruce Marriner
7f15cb77c3
Initial add of working udpKeepAlive function
2016-01-11 18:37:59 -06:00
Bruce Marriner
6f6b1d360c
Move improvements to voice support
2016-01-10 18:17:24 -06:00
Bruce Marriner
093d3be770
More improvements to voice support
2016-01-10 18:01:05 -06:00