tinify webpacks (#1975)

* tinify webpack

* meme

* fix long version

* more changes

* even smoler

* fix up logic

* fix build

* undo changes to user agent manager because its not webpack'd anymore

* the heck

* fix stupid

* clean up browser rules

* typo
This commit is contained in:
Gus Caplan
2017-09-26 00:18:12 -05:00
committed by Crawl
parent 4d4d2f2db7
commit 27ccad1f1c
21 changed files with 85 additions and 80 deletions

View File

@@ -3,13 +3,13 @@ const handlers = require('./handlers');
const APIRequest = require('./APIRequest');
const routeBuilder = require('./APIRouter');
const { Error } = require('../errors');
const { Endpoints } = require('../util/Constants');
const { Endpoints, browser } = require('../util/Constants');
class RESTManager {
constructor(client, tokenPrefix = 'Bot') {
this.client = client;
this.handlers = {};
this.userAgentManager = new UserAgentManager(this);
if (!browser) this.userAgentManager = new UserAgentManager(this);
this.rateLimitedEndpoints = {};
this.globallyRateLimited = false;
this.tokenPrefix = tokenPrefix;