Commit graph

618 commits

Author SHA1 Message Date
Bruce Marriner
c8e6cbffcf Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-28 21:18:53 -05: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
9aaebf7100 Merge pull request #186 from jonas747/develop
Fixed ChannelMessageAck
2016-04-28 18:16:50 -05:00
Bruce Marriner
38c51ce788 Renamed RateLimited to RateLimit
This is more consistant with other event names.
2016-04-28 17:43:41 -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
jonas747
beec086d69 Fixed ChannelMessageAck 2016-04-29 00:40:42 +02: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
2ac4665a4e Clean up Gateway API Event handling. 2016-04-28 14:22:43 -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
dd69a7e27f Added logging statements 2016-04-28 09:27:57 -05:00
Bruce Marriner
2b85edc4a1 comments 2016-04-28 09:26:35 -05:00
Bruce Marriner
609e7ad682 Logging code cleanup 2016-04-28 08:36:04 -05:00
Bruce Marriner
df818b5931 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-28 07:48:59 -05:00
Bruce Marriner
250579eb3a Fix incorrect handling of VOICE_SERVER_UPDATE
With this change, discordgo now properly supports
VOICE_SERVER_UPDATE events and will upon request
close existing connections and then re-open the
connection to the new voice endpoint.  This allows
voice gateway redirects and voice region changes
to work even while a client is sending audio.
2016-04-28 07:43:31 -05:00
Bruce
f64bae1371 Merge pull request #184 from iopred/patch-7
Add missing RLock in State.Channel
2016-04-27 16:47:49 -05:00
Chris Rhodes
7efe4ccfee 👌 2016-04-27 14:43:43 -07:00
Chris Rhodes
84f0b5d41a Add missing RLock in State.Channel 2016-04-27 14:38:29 -07:00
Bruce Marriner
1a4bb2a004 Even more detailed comments on log levels 2016-04-26 22:00:51 -05:00
Bruce Marriner
852a968873 Comment log levels. 2016-04-26 21:34:01 -05:00
Bruce Marriner
2695ae1b21 clean up comments a little 2016-04-26 21:22:28 -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
Bruce Marriner
de235a04f0 Adjust error code returned from UserAvatar test 2016-04-26 20:19:29 -05:00
Bruce
5398a481cc Merge pull request #167 from b1naryth1ef/feature/gateway-v4
Support Gateway v4
2016-04-26 20:15:02 -05:00
Bruce Marriner
58d143ccb3 Slight update.. 2016-04-26 15:29:35 -05:00
Bruce Marriner
b5bb8f7477 Some website contented added :) 2016-04-26 14:48:06 -05:00
Bruce Marriner
37ede2b51f Add mkdocs structure 2016-04-26 08:38:13 -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
77d4767481 Set bot to deaf when connecting
This prevents a udp listener from starting which
is entirely unneeded for this type of bot.
2016-04-25 21:59:03 -05:00
Bruce Marriner
08b7e18609 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-25 21:34:26 -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
89c4d40ae3 Merge pull request #182 from iopred/patch-6
Include dca-rs in example.
2016-04-25 20:19:43 -05:00
Bruce Marriner
40fce5bd1a Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-25 20:16:44 -05:00
Bruce Marriner
280ad2cdc3 dg nil check on TestGateway 2016-04-25 20:16:18 -05:00
Chris Rhodes
9ea982f36e Update README.md 2016-04-25 18:01:59 -07:00
Chris Rhodes
9c55dfbb8e Include dca-rs in example. 2016-04-25 17:59:19 -07:00
Bruce
b788445393 Merge pull request #181 from iopred/develop
Add a new example that acts like airhorn.solutions
2016-04-25 19:44:16 -05:00
Chris Rhodes
290da20da7 Add a new example that acts like airhorn.solutions 2016-04-25 17:13:41 -07:00
Bruce
257294634b Update README.md 2016-04-25 18:33:50 -05:00
Bruce Marriner
2b7da95627 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-25 15:53:15 -05:00
Bruce Marriner
22b269087c Fancy links 2016-04-25 15:53:01 -05:00
Bruce
34fcdb37b3 Merge pull request #179 from jonas747/defaultmsgnotifi
Added default_message_notifications to guild struct
2016-04-25 15:34:57 -05:00
Bruce Marriner
a258ec3011 Slight change to error message. 2016-04-25 15:33:40 -05:00
Bruce Marriner
e2e03c3078 Do not allow sending role colors > 0xFFFFFF 2016-04-25 15:19:23 -05:00
Bruce Marriner
0d1f5f55fb Add nil checks for dg on new tests 2016-04-25 14:06:37 -05:00
jonas747
ef3264d3a2 Added default_message_notifications to guild struct 2016-04-25 20:52:58 +02:00
Bruce Marriner
862c3ebeb1 Removed debug setting 2016-04-25 13:32:31 -05:00
Bruce
50484681d1 Merge pull request #178 from bwmarrin/revert-166-feature/sharding
Revert "Add sharding support"
2016-04-25 13:30:05 -05:00
Bruce Marriner
2aa94c20ae Added test back. 2016-04-25 13:27:34 -05:00
Bruce
cb6b3b956e Revert "Add sharding support" 2016-04-25 13:24:00 -05:00
Bruce Marriner
23dc063228 Added a few tests 2016-04-25 13:04:21 -05:00