Commit graph

520 commits

Author SHA1 Message Date
Bruce Marriner
c56fae4243 Added new example that displays user token 2016-04-22 10:13:41 -05:00
Bruce Marriner
b0fd6061eb Merge branch 'master' into develop
Conflicts:
	discord.go
2016-04-13 12:54:38 -05:00
Bruce Marriner
d658974d29 Bump version to 0.12.1 2016-04-13 12:48:26 -05:00
Bruce Marriner
da2b859817 Merge branch 'master' into develop 2016-04-13 12:29:17 -05:00
Bruce
4c4e8386bc Merge pull request #165 from b1naryth1ef/bugfix/channel-mappings
Fix channelMap not being filled for bot users/>100 guilds
2016-04-13 13:03:45 -04:00
andrei
34f83532dd Fix channelMap not being filled for bot users/>100 guilds
Previously we only filled the channelMap inside of READY. Because of
lazy guild loading, this was not valid for the majority of users (e.g.
bot users and users with more than 100 guilds). We now properly handle
both cases, by filling in the channelMap on GUILD_CREATE.

This commit also refactors the way we do locking inside of GUILD_CREATE
and CHANNEL_CREATE to be a bit cleaner.
2016-04-13 01:41:18 -07:00
Bruce Marriner
33f2fa8d81 Bump version to v0.13.0-alpha 2016-04-12 12:35:34 -05:00
Bruce Marriner
3ecffcdd78 Merge branch 'develop' 2016-04-12 12:30:47 -05:00
Bruce Marriner
12b010078c Bump version to v0.12.0 2016-04-12 12:28:19 -05:00
Bruce
6abc247a2d Merge pull request #164 from iopred/develop
Prime the channel map correctly.
2016-04-12 11:49:15 -04:00
Chris Rhodes
4609c31a72 Prime the channel map correctly. 2016-04-12 08:44:01 -07:00
Bruce Marriner
ddeb148835 Link to Awesome-DiscordGo 2016-04-12 08:29:48 -05:00
Bruce
38103b6061 Merge pull request #163 from iopred/develop
Add fast lookups for guilds and channels in state.
2016-04-12 09:11:41 -04:00
Chris Rhodes
408bbb54b6 Don't undo b1nzy's work. 2016-04-11 22:21:26 -07:00
Chris Rhodes
87b2daa832 Merge remote-tracking branch 'bwmarrin/develop' into develop 2016-04-11 22:17:26 -07:00
Bruce Marriner
da732804b1 Added section for troubleshooting 2016-04-11 20:25:55 -05:00
Bruce Marriner
1a672823a2 Lint and Cleanup 2016-04-11 18:54:19 -05:00
Bruce Marriner
836e78d3d9 Pass struct along with OnEvent event. 2016-04-11 16:56:43 -05:00
Chris Rhodes
4e16cfef0e Update some comments. 2016-04-10 16:20:14 -07:00
Chris Rhodes
fa63c00fa2 Add fast lookups for guilds and channels in state. 2016-04-10 16:18:29 -07:00
Bruce Marriner
92c27c7712 Because binzy was too lazy.
No seriously, this allows us see if a guild is actually being created
or just being lazy-loaded.
2016-04-08 11:51:58 -05:00
Bruce
6101abeb27 Merge pull request #161 from b1naryth1ef/bugfix/lazy-guild-loading
Support guild lazy loading.
2016-04-04 17:52:14 -04:00
andrei
019d0fe9af Fix lazy-loading of guilds not working
We're moving to lazy-loading guilds, meaning bots now recieve a READY
packet with guilds that only have 'id' and 'unavailable' fields. Post
READY, the client then lazyily recieves GUILD_CREATE's for the rest of
the guilds it's in. Previously we assumed the first instance of the
guild we got (from ready) had all the required information, now we need
to use the GUILD_CREATE if the guild was marked as unavailable.
2016-04-04 13:45:41 -07:00
Bruce
4c9d6e78b1 Merge pull request #159 from iopred/ordering
Fix ordering of the OnReady event and Session being updated.
2016-04-01 23:31:58 -05:00
Bruce
e325c8e9f9 Merge pull request #160 from iopred/messagecount
Don't perform guild lookups if message tracking is not enabled.
2016-04-01 23:31:46 -05:00
Bruce
38ca716b15 Merge pull request #158 from iopred/develop
Fix user struct embedding in UserUpdate event.
2016-04-01 23:31:13 -05:00
Chris Rhodes
8ae2adfb01 Don't perform guild lookups if message tracking is not enabled. 2016-04-01 18:22:18 -07:00
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