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
Bruce Marriner
1b3817c7e1
First re-write of voice support. BREAKING CHANGE.
2016-01-09 20:56:30 -06:00
Bruce Marriner
59ed5b0b40
The start of the voice rework begins.
2016-01-08 10:53:33 -06:00
Bruce Marriner
50394ab954
Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop
2016-01-07 13:50:55 -06:00
Bruce Marriner
301fb980d3
Updated copyright year, cleaned up some comments.
2016-01-07 13:50:44 -06:00
Bruce Marriner
d6314c034e
Fixes for compatibility with Go 1.3, closes #56 .
2016-01-07 13:28:33 -06:00
Bruce Marriner
8c301a4126
Clean up voice.go, should work better on other systems now, closes #31
2015-12-20 17:04:31 -06:00
Bruce Marriner
b87add9152
All sent JSON data now using structs
2015-12-20 00:13:19 -06:00
Bruce Marriner
106c69f28a
Added VoiceReady support to voice
2015-11-25 19:29:22 -06:00
Bruce Marriner
9d42bf1cc6
Check that websocket exists before trying to send VoiceSpeaking
2015-11-25 08:31:26 -06:00
Bruce Marriner
35e3966b91
Reworded top comment
2015-11-23 10:16:23 -06:00
Bruce Marriner
abe55ecca7
Some improvements to comments.
2015-11-23 09:45:40 -06:00