Commit graph

8 commits

Author SHA1 Message Date
Bruce
f60eda8bcb Add missing fields to Application struct 2017-04-10 21:07:04 +00:00
jonas747
56b19073d3 Ratelimits (#273)
* 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
2016-11-04 08:07:22 -07:00
robbix1206
b961ee3b6f #231 Support getting Bot account / owner 2016-08-31 15:59:25 +02:00
Bruce Marriner
777a81710d Removed feature to convert user to bot account.
This feature was removed by Discord and no longer works.
2016-06-14 09:04:00 -05:00
Chris Rhodes
3686cc7ce3 Support many more idioms. 2016-06-03 20:59:35 -07:00
Bruce Marriner
1a672823a2 Lint and Cleanup 2016-04-11 18:54:19 -05:00
Bruce Marriner
24be2cda0b Added ApplicationBotCreate function 2016-03-11 15:58:38 -06:00
Bruce Marriner
a7910562ad Added OAuth2 Application functions and example 2016-03-11 13:47:04 -06:00