rewrite ratelimiting and api route builder (#1667)

* rewrite ratelimiting and api route builder

* more stuff

* let people pass their own handlers

* Update burst.js

* Update RequestHandler.js

* Update burst.js

* Update sequential.js

* Update RequestHandler.js
This commit is contained in:
Gus Caplan
2017-07-20 19:32:40 -05:00
committed by Crawl
parent 11556c0b3b
commit a2eeafc75d
20 changed files with 187 additions and 316 deletions

View File

@@ -121,7 +121,7 @@ class Emoji {
* .catch(console.error);
*/
edit(data, reason) {
return this.client.api.guilds[this.guild.id].emojis[this.id]
return this.client.api.guilds(this.guild.id).emojis(this.id)
.patch({ data: {
name: data.name,
roles: data.roles ? data.roles.map(r => r.id ? r.id : r) : [],