* Fix#406: reconnect() can be called while still connected
* Add memberMap to speed up member queries
* Fix error return value and remove deletion
* Fix GuildAdd member map initialization edge case
* Add rate limit buffering support
- Break request into requestInner
- Break LockBucket into LockBucketObject
- Change getBucket to GetBucket so it can be externally accessed
- Add RequestBuffer interface
- Add RequestBuffer pointer to Bucket struct
- Add RequestPostWithBuffer() function to Session
* Remove internal implementation, export ratelimiter instead
* add custom ratelimits
* check for nil ratelimiter
* Don't expose custom ratelimits to Session
* attempt to fix race conditions
* use defer instead
* Slightly improved ratelimiter
You shouldn't need to change the ratelimiters ratelimits while its
running so I removed the functions SetCustomRatelimit and
RemoveCustomRatelimit.
* Add support for the prune endpoint
Adds functions to get the amount of members that could be pruned
and to prune members using the prune endpoint.
May close: bwmarrin/discordgo#147
* Deal with the go vet error
Removed the json tags from the unexported struct.
Should pass the tests now.
* Make the PR consistent with the rest of the file.
Removes url building in favour of string concatenation.
* Fix the previous commit
Adds back the result struct.
Converts the uint32 to string.
* Deal with golint comments
* Remove the failing test
Cleans up the uri concatenation.
Removes the failing test due to incorrect permissions.
* Added ratelimiter
Handles the new ratelimit headers
- X-RateLimit-Remaining
- X-RateLimit-Reset
- X-RateLimit-Global
* Pad only reset time with a second
* Moved ratelimiter out of internal package
* Change for loop, move global ratelimit check inside sleep check
* Moved ratelimiter locking to getBucket
* Added global bucket
* Changed how bucket id's are done
Now each request function will need to specify the bucket id if the
endpoint contains minor variables
* Allow empty bucketID in request
* Remove some uneeded Endpoint* function calls
* Added test for global ratelimits
* Fixed a silly little mistake causing incorrect ratelimits
* Update test comments, Fixed treating a endpoint as 2 in ratelimiting
* Use date header from discord instead of relying on sys time sync
* Update all REST functions to use RequestWithBucketID
* Embed mutex into bucket
* Added webhook and reaction buckets