Commit graph

474 commits

Author SHA1 Message Date
Bruce Marriner
ae20f9c4b1 It's all Jake & b1nzy's fault.
Removed unit test that is now 2/hour rate limited and causing
Travis to think we're failures.
2016-03-20 14:50:26 -05: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
c359bf8395 Cleanup 2016-03-17 13:33:57 -05:00
Bruce Marriner
383a3cf1e0 Delete voice connection from map on error 2016-03-16 22:48:48 -05:00
Bruce Marriner
ee07ed8afe Only return valid existing voice connections 2016-03-16 22:47:53 -05:00
Bruce Marriner
7ec5304bc9 ChannelVoiceJoin now waits for the connection.
You can return to the previous behaviour just by calling
the function as a goroutine.  However I feel most uses of it
require the connection to be ready before the next step.
2016-03-15 08:30:05 -05:00
Bruce Marriner
1cc1d4c9bb Add examples for creating bot account 2016-03-14 09:16:04 -05:00
Bruce Marriner
50cc4df965 Some, slightly messy, fixes to get voice -working-. 2016-03-11 23:19:35 -06:00
Bruce Marriner
88492a1dcf Add Token to user struct, and some gofmt. 2016-03-11 23:18:36 -06:00
Bruce Marriner
24be2cda0b Added ApplicationBotCreate function 2016-03-11 15:58:38 -06:00
Bruce Marriner
f4f68879ab Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-03-11 13:49:57 -06:00
Bruce Marriner
a7910562ad Added OAuth2 Application functions and example 2016-03-11 13:47:04 -06:00
Bruce Marriner
f9bf5fb040 Added HTTP 201 to Request and gofmt :) 2016-03-11 13:43:45 -06:00
Bruce Marriner
798640ecf7 Added OAuth2 Application endpoints 2016-03-11 13:43:23 -06:00
Bruce
20e9ea5934 Merge pull request #146 from iopred/patch-3
Support the new bot field on User.
2016-03-11 03:18:33 -06:00
Chris Rhodes
60b801db27 Support the new bot field on User. 2016-03-10 22:02:59 -08:00
Bruce
1003bec0aa Merge pull request #145 from iopred/develop
Clean up voice state updates, make them goroutine safe.
2016-03-10 21:30:06 -06:00
Chris Rhodes
6ec1c07300 Clean up voice state updates, make them goroutine safe. 2016-03-10 19:15:30 -08:00
Bruce
0dac7777c1 Merge pull request #141 from b1naryth1ef/feature/multiple-voice-connection
Add the ability to have multiple cross-guild voice connections open.
2016-03-09 21:14:43 -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
Bruce
512257a328 Merge pull request #142 from iopred/develop
Set GuildID on all channels in READY.
2016-03-05 23:13:10 -06:00
Chris Rhodes
e37b86d3e8 Merge remote-tracking branch 'bwmarrin/develop' into develop 2016-03-05 20:18:22 -08:00
Chris Rhodes
7eb0bd2aed Set GuildID on all Channels in READY. 2016-03-05 20:18:18 -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
f9db2f7ed6 Merge pull request #140 from abalabahaha/develop
Added UserChannelPermissions function
2016-03-04 08:26:48 -06:00
abalabahaha
0969cc3d86 Format the permission constants 2016-03-04 06:12:17 -08:00
abalabahaha
539b9d203f Fix UserChannelPermissions 2016-03-04 05:50:11 -08:00
abalabahaha
cd24674ebb Added UserChannelPermissions function 2016-03-04 08:07:57 +00:00
Bruce
d0c30f0f14 Merge pull request #139 from noisypixy/develop
Replace HTTP status codes for net/http constants.
2016-03-03 00:24:16 -06:00
noisypixy
ce9840f8c4 Constant missing in Go < 1.6 2016-03-02 21:13:53 -04:30
noisypixy
6c820412cf Replace HTTP status codes for net/http constants. 2016-03-02 19:26:00 -04:30
Bruce
f5b21ea2a0 Merge pull request #136 from nstafie/develop
BREAKING -- Add VerificationLevel value consts and a typedef for int
2016-02-28 14:05:10 -06:00
Nicholas Stafie
cba9b5039e
Refactor VerificationLevel consts 2016-02-27 01:22:02 +02:00
Nicholas Stafie
58fe658fa5 Add VerificationLevel value consts and a typedef for int 2016-02-27 00:28:05 +02:00
Bruce
226df093f6 Merge pull request #132 from nstafie/develop
BREAKING -- Add support for setting guild region and verification level
2016-02-26 14:58:56 -06:00
Bruce Marriner
a45e493e1f Add limit max values in comments 2016-02-24 23:29:59 -06:00
Bruce Marriner
73c0b90f16 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-02-24 23:28:46 -06:00
Bruce Marriner
85e06e3e83 Encrypt / Decrypt Voice packets, closes #133 2016-02-24 23:27:56 -06:00
Nicholas Stafie
f5ac3b10bf
Better document GuildEdit arguments 2016-02-25 00:31:51 +02:00