* Start rewriting Manager and Connection
* more stuff
* stuff
* Fix ready bug
* some stuff i forgot
* fix some stuff
* add stupid heartbeat ack like seriously who cares
* woo!
* fix a bug
* rate limit the dumb websocket
* stuff
* hdocs
* Docs
* Remove ClientManager#setupKeepAlive as it is now redundant
* Change Client._pingTimestamp to a getter that fetches the timestamp from the WebSocketConnection
* are you happy now eslint smh
* make gus happy
* Add CloseEvent external doc
* Make sure to emit 'reconnecting' when actually reconnecting
* ffs
* Fix RESUME logic
* Add heartbeat ack debug messages, including latency data
* Dumb stuff for Gus
* thx eslint
* more dumb stuff
* more dumb crap smh gus i h8 u
* moar messages
* fix for using wrong status, causing certain events not to be fired (#1422)
If the promise returned by logout() rejects, previously
it would be completely uncaught, and just return an
eternally pending promise that never resolved.
Related to pull requests #828 and #839.
* add test for Client.destroy()
* propagate errors in ClientManager.destroy
If the promise returned by logout() rejects, previously
it would be completely uncaught, and just return an
eternally pending promise that never resolved.
* fix RESTMethods.logout
Without a data argument, the POST that superagent sends causes
the discord server to reply with a HTTP 400 error:
text: '{"Content-Type": "Expected Content-Type to be one of set([\'application/json\'])."}',
* fix Client.destroy
_timeouts and _intervals were changed to Set objects in
commit 6ede7a32fd a month ago.
Changing them to arrays causes failures if you try to reuse
the client object again.
* always close websocket in ClientManager.destroy
Invoking logout does not implicitly cause the server to close
the websocket for you, so cleanup everything.
Otherwise the websocket being open keeps node alive and hanging
mysteriously until the connection hits a timeout.
* fix indentation for eslint
* add documentation for events, and add a disconnect event, because i know people use that
* generate docs, and fix a hastily copied docstring
* fix permissions freak out