Make token "Bot" removal more lenient

In case of heavy user error. :)
This commit is contained in:
Schuyler Cebulskie
2016-10-14 02:14:00 -04:00
parent e4636243b2
commit 8f0e2e0c56
3 changed files with 3 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ class ShardingManager extends EventEmitter {
* Token to use for obtaining the automatic shard count, and passing to shards
* @type {?string}
*/
this.token = options.token ? options.token.replace(/^Bot /, '') : null;
this.token = options.token ? options.token.replace(/^Bot\s*/i, '') : null;
/**
* A collection of shards that this manager has spawned