Commit graph

65 commits

Author SHA1 Message Date
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
33f2fa8d81 Bump version to v0.13.0-alpha 2016-04-12 12:35:34 -05:00
Bruce Marriner
12b010078c Bump version to v0.12.0 2016-04-12 12:28:19 -05:00
Bruce Marriner
1a672823a2 Lint and Cleanup 2016-04-11 18:54:19 -05:00
Chris Rhodes
45e01b20c9 Fix ordering of the OnReady event and Session being updated. 2016-04-01 18:06:20 -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
Chris Rhodes
584b06aae5 Support VoiceSpeakingUpdates on VoiceConnection. 2016-03-18 10:50:25 -07:00
Bruce Marriner
44d4667463 Bump to v0.12.0-alpha 2016-02-20 20:59:40 -06:00
Bruce Marriner
cadf36c775 Bump to v0.11.0 2016-02-20 20:53:56 -06:00
Chris Rhodes
457b03f66e Fix deadlock because I'm dumb. 2016-02-19 23:00:41 -08:00
Chris Rhodes
c291988335 Bring back the Lock as it's technically correct. 2016-02-19 22:32:15 -08:00
Chris Rhodes
79247272ff Handler updates, no backwards incompatible API changes.
AddHandler now returns a func that can remove the handler.
The handlers map is now guarded by its own mutex.
Moved eventMap to events.go for readability.
Improved documentation.
2016-02-19 22:28:21 -08:00
Chris Rhodes
32f8c03270 Fix a Lock instead of RLock in initialize. 2016-02-19 11:25:46 -08:00
Chris Rhodes
d22b7ffc90 Clean up mutexes around s.handlers so they exist only in discord.go 2016-02-17 23:17:31 -08:00
Bruce Marriner
aebfb09719 Baby Linting. 2016-02-15 21:50:41 -06:00
Chris Rhodes
b083ce00c7 Un-expose handlers. Clean up Session struct. 2016-02-14 21:58:29 -08:00
Chris Rhodes
88335b6f54 Small performance improvement. Added tests. 2016-02-14 19:01:45 -08:00
Chris Rhodes
6fa99712ef Finish converting large switch statement into a map of functions. 2016-02-14 18:48:37 -08:00
Chris Rhodes
8ffaa85b0b Thread safety and more events. 2016-02-14 13:41:56 -08:00
Chris Rhodes
fb6ae92555 Add basic support for mapped event handlers. 2016-02-14 13:17:20 -08:00
Bruce Marriner
f917d83f6e Linting. 2016-01-27 23:39:56 -06:00
Bruce Marriner
9a63e50e22 Bump dev to v0.11.0-alpha 2016-01-27 13:31:14 -06:00
Bruce Marriner
fd42d568ec Bump version to v0.10.0 2016-01-27 13:27:21 -06:00
Bruce Marriner
94b6199051 ShouldReconnectOnError and Compress are defaulted to true with New() 2016-01-24 13:21:32 -06:00
Chris Rhodes
bf5ca4d690 Fix comment. 2016-01-21 10:59:30 -08:00
Chris Rhodes
8b39278c3e Get rid of Listen. 2016-01-21 10:58:13 -08:00
Chris Rhodes
c4869d7a43 Remove handshake. 2016-01-21 09:19:20 -08:00
Chris Rhodes
cd55a59ff9 Refactor open/close logic. Support OnConnect and OnDisconnect. 2016-01-20 22:47:34 -08:00
Chris Rhodes
1d9f97e283 Update New to allow an auth token to be specified. 2016-01-17 14:17:51 -08:00
Bruce Marriner
daa230a3c1 Bump dev version to 0.10.0-alpha 2016-01-12 08:31:00 -06:00
Bruce Marriner
e1bfc285a0 Bump version to 0.9.0 2016-01-12 08:29:44 -06:00
Bruce Marriner
2469147d8a Even better checking that we don't close nil/closed chans. 2016-01-11 14:33:01 -06:00
Bruce Marriner
61b3b8122c Only close chans if they are open, closes #80 2016-01-11 13:23:11 -06:00
Bruce Marriner
b5e45827fd Better error checking for New() and Gateway() funcs, closes #75 2016-01-10 19:01:34 -06:00
Bruce Marriner
301fb980d3 Updated copyright year, cleaned up some comments. 2016-01-07 13:50:44 -06:00
Bruce Marriner
d737b91b77 Bump version to v0.9.0-alpha 2016-01-06 16:43:06 -06:00
Bruce Marriner
ad7b7603c6 Bump version for v0.8.0 2016-01-06 16:36:34 -06:00
Bruce Marriner
1ae278b8c0 Modify session close function to do a better job 2016-01-04 13:13:10 -06:00
Chris Rhodes
9ba6d5b7c1 Make state tracking optional. 2016-01-02 12:01:03 -08:00
Chris Rhodes
4e23e5fc35 Implement state tracking.
Currently maintains a list of Guilds (Members/Channels) and PrivateChannels.
2016-01-01 22:47:19 -08:00
Bruce Marriner
4e90b453b6 Bump develop branch to version 0.8.0-alpha 2015-12-29 13:48:18 -06:00
Bruce Marriner
31e27aaffb Bump version to 0.7.0 2015-12-29 13:45:28 -06:00
Bruce Marriner
ff03e10888 Bump version for 0.7.0-alpha for development 2015-12-21 11:52:54 -06:00
Bruce Marriner
cc6280cee3 Bump version to 0.6.0 2015-12-21 11:48:11 -06:00
Bruce Marriner
0a5055904c Up version to 0.6.0-alpha 2015-12-21 09:48:07 -06:00
Bruce Marriner
0fbfc66554 Comments, example posible future main data struct 2015-12-20 00:12:57 -06:00
Bruce Marriner
40a7e717f5 Added VERSION constant 2015-12-17 08:23:48 -06:00
Bruce Marriner
1d06c4a3b8 Added helper func New() which greatly simplifies creating a new Discord session. 2015-12-07 13:54:06 -06:00