Commit graph

122 commits

Author SHA1 Message Date
Chris Rhodes
8bd3f75441 Merge pull request #227 from jonas747/retry
Retry on 502's
2016-09-27 21:19:25 -07:00
Chris Rhodes
9b6b657083 Merge pull request #249 from iopred/develop
Correctly merge GUILD_UPDATE events. Closes #242
2016-09-27 21:15:03 -07:00
soft as HELL
ef3cd76e3d Add mentionable to Role struct 2016-09-11 14:32:41 +03:00
Chris Rhodes
678756c9a9 Simplify Guild.Unavailable and correctly merge GUILD_UPDATE events. 2016-09-08 19:39:29 -07:00
jonas747
2a1f0ff893 Added the CHANNEL_PINS_UPDATE event 2016-07-29 23:40:56 +02:00
jonas747
092ed4b585 Retry on 502's 2016-07-11 22:30:11 +02:00
Bruce Marriner
af57bc1789 comment Deprecation for VoiceReady and UDPReady 2016-06-24 13:10:56 -05:00
Bruce Marriner
eeb2d4f62d Add mfa_enabled to User struct 2016-06-24 11:55:52 -05:00
Bruce
79d49f86fb Merge pull request #216 from jonas747/userguildsettings
Added UserGuildSettingsEdit
2016-06-15 08:30:01 -05:00
jonas747
f2f2d6430b Added UserGuildSettingsEdit 2016-06-15 12:07:57 +02:00
Bruce Marriner
9dc51d1c49 Only Shard when ShardCount > 1
Also cleaned up identify sending so there's now a function that handles
it instead of duplicate code.  Renamed handshake* structs to identify*
structs to make naming match up.
2016-06-14 13:45:38 -05:00
Bruce Marriner
d03b3eedfa Merge branch 'feature/sharding' of https://github.com/b1naryth1ef/discordgo into b1naryth1ef-feature/sharding 2016-06-14 11:45:59 -05:00
Bruce Marriner
cec33d9477 Arange struct to reduce memory usage. 2016-06-14 09:05:19 -05:00
andrei
835a23a89d Implement guild sharding 2016-06-13 15:34:40 -07:00
Chris Rhodes
323abd1a87 Use embedded Presence in presenceUpdate 2016-06-05 22:41:08 -07:00
jonas747
caadaaaf2c Added guild_positions field to settings 2016-05-18 02:40:41 +02:00
Chris Rhodes
80c2158605 Support streaming status updates. 2016-05-06 15:23:21 -07:00
Bruce Marriner
a9da8a5daf Cleanup, Logging, Finished Resumed code. 2016-04-30 21:40:13 -05:00
Bruce
dd0b83333c Merge pull request #189 from jonas747/develop
Nickname support
2016-04-30 19:12:18 -05:00
Bruce Marriner
e9e9ef86b3 Prevent concurrent writes to gateway websocket. 2016-04-30 19:11:13 -05:00
jonas747
0b313b016f Add nick field to guild member struct 2016-04-30 23:43:52 +02:00
Bruce Marriner
f6de2b2c98 gateway, voice, & logging improvements
We now store teh sessionID of the gateway connection for later use. We
are now caching the gateway url and will use it until unable to connect
to that gateway.  We're not longer smashing the VoiceConnections map
during reconnects which was causing Voice problems. Slight change to
log output format.
2016-04-28 21:15:32 -05:00
Bruce Marriner
098d7861a4 BREAKING - Added RateLimited event
Renamed RateLimit struct to TooManyRequests{} and added new event struct
RateLimited{} which can be registerd to with AddHandler() and will be
emitted anytime a HTTP 429 is received on the HTTP API.
2016-04-28 17:41:05 -05:00
Bruce Marriner
94770635a9 Event handing improvements.
Corrected the Event struct to match it's new state based on Discord docs
and started tracking sequence number and sending it with heatbeats.
Also, move cleanup and comment improvements.
2016-04-28 16:59:45 -05:00
Bruce Marriner
a24f9e3d10 Slight better rate limit handling
This improves greatly on the previous rate limit handling
however still needs review and possible improvement.
Please report bugs!
2016-04-28 13:38:20 -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
jonas747
ef3264d3a2 Added default_message_notifications to guild struct 2016-04-25 20:52:58 +02:00
Bruce
cb6b3b956e Revert "Add sharding support" 2016-04-25 13:24:00 -05:00
Bruce
d5503b3621 Merge pull request #176 from jonas747/settings
Added new fields to Settings struct
2016-04-24 20:53:39 -05:00
jonas747
82ac29f0bc Updated settings struct 2016-04-25 03:30:12 +02:00
Bruce
ceac4e3e25 Merge pull request #174 from jonas747/dunno
Added new fields to READY struct.
2016-04-24 18:24:20 -05:00
jonas747
339ad583da Changed Id to ID per iopreds request 2016-04-25 00:59:03 +02:00
jonas747
88c37e75a1 Figured out relationship type 2016-04-25 00:56:51 +02:00
jonas747
4906a4cf9c Added some undocumented fields to ready event 2016-04-24 23:35:37 +02:00
Bruce
b14a2ce8da Merge pull request #171 from iopred/develop
Fix unmarshall error with Invite, improve error logging.
2016-04-23 22:35:51 -05:00
Chris Rhodes
8be21fb539 Fix unmarshall error with Invite, improve error logging. 2016-04-23 11:03:07 -07:00
Bruce Marriner
bda7434f18 Moved State struct to state.go 2016-04-22 16:53:57 -05:00
Bruce
7bd2bb19d8 Merge pull request #166 from b1naryth1ef/feature/sharding
Add sharding support
2016-04-22 15:42:23 -05:00
Chris Rhodes
24e7f04e0e Add support for GuildEmbed and GuildIntegration endpoints. 2016-04-22 11:34:04 -07:00
andrei
92caf31b7f Implement Guild Sharding
This implements the upcoming change (see hammerandchisel/discord-api-docs#17)
to add guild-sharding support directly in the Discord Gateways.
2016-04-19 18:09:38 -07:00
Chris Rhodes
87b2daa832 Merge remote-tracking branch 'bwmarrin/develop' into develop 2016-04-11 22:17:26 -07: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
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
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
Chris Rhodes
6e568533b2 Early support for PresencesReplace 2016-03-19 16:22:36 -07:00
Bruce Marriner
88492a1dcf Add Token to user struct, and some gofmt. 2016-03-11 23:18:36 -06:00
Chris Rhodes
60b801db27 Support the new bot field on User. 2016-03-10 22:02:59 -08:00
andrei
5dc0b9f2a1 Add connect timeout, fix ChannelVoiceJoin "leaking" connections 2016-03-08 02:36:00 -08:00