added large_threshold as an option

This commit is contained in:
hydrabolt
2016-02-12 21:08:13 +00:00
parent 5132c9ade4
commit abde946864
4 changed files with 4 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ var Client = (function (_EventEmitter) {
this.options.compress = options.compress || !process.browser;
this.options.revive = options.revive || false;
this.options.rate_limit_as_error = options.rate_limit_as_error || false;
this.options.large_threshold = options.large_threshold || 250;
this.internal = new _InternalClient2["default"](this);
}

View File

@@ -1287,7 +1287,7 @@ var InternalClient = (function () {
token: self.token,
v: 3,
compress: self.client.options.compress,
large_threshold: 250,
large_threshold: self.client.options.large_threshold,
properties: {
"$os": "discord.js",
"$browser": "discord.js",

View File

@@ -35,6 +35,7 @@ export default class Client extends EventEmitter {
this.options.compress = options.compress || (!process.browser);
this.options.revive = options.revive || false;
this.options.rate_limit_as_error = options.rate_limit_as_error || false;
this.options.large_threshold = options.large_threshold || 250;
this.internal = new InternalClient(this);
}

View File

@@ -1086,7 +1086,7 @@ export default class InternalClient {
token: self.token,
v: 3,
compress: self.client.options.compress,
large_threshold : 250,
large_threshold : self.client.options.large_threshold,
properties: {
"$os": "discord.js",
"$browser": "discord.js",