This commit:
* fixes inconsistencies (primarily regarding capitalization)
* fixes non-proper nouns that were improperly capitalized
* fixes reminents from not-so-meticulous copy+paste jobs
* Add support for notes
* Ensure consistency with notes from ready payload
* Add getter method for users
* Minor tweaks
* Update warning messages
* More minor fixes
_timeouts and _intervals were changed to Set objects in
commit 6ede7a32fd a month ago.
Like #844, this fix was reverted in 7d04863b66 (#839)
without explanation and was never included in the followup rewrite in
commit 5e2ee2398e.
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