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 a script to automatically build and push docs
This script will checkout the repo in the `docs` branch, then build the
docs locally, copy it to that repo, commit and push. It is designed to
be used in conjunction with Travis.
* Add unencrypted deploy keys to the gitignore
* Make Travis automatically execute the deploy script
* Add the encrypted deploy key
* Update the .travis.yml with the necessary information
* 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