Commit graph

593 commits

Author SHA1 Message Date
Chris Rhodes
45e01b20c9 Fix ordering of the OnReady event and Session being updated. 2016-04-01 18:06:20 -07:00
Chris Rhodes
756bc98463 Fix user struct embedding in UserUpdate event. 2016-04-01 16:59:17 -07:00
Bruce Marriner
c0bc3f68d3 Don't import what you don't use. 2016-04-01 13:37:56 -05:00
Bruce
b2427516da Merge pull request #157 from iopred/develop
Fix potential infinite loop on state.
2016-04-01 13:37:03 -05:00
Chris Rhodes
99a1f5665a Fix potential infinite loop on state. 2016-04-01 11:31:10 -07:00
Bruce Marriner
a40bf8952c Removed onEvent handler
With the recent change to the OnEvent event now always executing
insted of only on error we don't want this printing out every
single event.  A different way to handle unknown events will be
added in the wsapi.go code.
2016-03-21 17:54:04 -05:00
Bruce Marriner
cd065fa61a Revert "Removed onEvent handler"
This reverts commit 974ed749e1.

Deleted the wrong function...
2016-03-21 17:53:15 -05:00
Bruce Marriner
974ed749e1 Removed onEvent handler
With the recent change to the OnEvent event now always executing
insted of only on error we don't want this printing out every
single event.  A different way to handle unknown events will be
added in the wsapi.go code.
2016-03-21 17:47:22 -05:00
Bruce
5af297183e Merge pull request #156 from iopred/develop
BREAKING -- Always handle the raw event.
2016-03-21 12:57:34 -05:00
Chris Rhodes
4d4f8f7741 Always handle the raw event. 2016-03-21 10:50:56 -07:00
Bruce
22ee31a6a0 Merge pull request #155 from jonas747/develop
Changed fmt.Print to log.Print
2016-03-21 11:20:04 -05:00
jonas747
d1f25d8561 Changed fmt.Print to log.Print 2016-03-21 17:13:39 +01:00
Bruce Marriner
1e2b1817bd Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-03-20 14:51:30 -05:00
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
eb0c379869 Merge pull request #153 from iopred/develop
Early support for PresencesReplace. Closes #152
2016-03-19 23:30:51 -05:00
Bruce
c3b2a1b57d Merge pull request #154 from b1naryth1ef/bugfix/guild-add-channels
Fix channels from a GUILD_CREATE packet having null GuildID's
2016-03-19 23:29:53 -05:00
andrei
7e7887a936 Fix channels inside a guild from GUILD_CREATE having a null GuildID 2016-03-19 18:58:47 -07:00
Chris Rhodes
6e568533b2 Early support for PresencesReplace 2016-03-19 16:22:36 -07:00
Bruce
192bbf3da9 Merge pull request #151 from iopred/develop
Support VoiceSpeakingUpdates on VoiceConnection.
2016-03-18 14:22:54 -05: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
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