mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 00:20:07 +00:00
Add 'Bot' prefix to token (#510)
* Add 'Bot' prefix to token * Add option for token prefix * Maybe this is what abal meant? * Change option name * Check if token already starts with prefix
This commit is contained in:
@@ -521,10 +521,12 @@ export default class InternalClient {
|
||||
this.email = email;
|
||||
this.password = password;
|
||||
|
||||
var self = this;
|
||||
return this.getGateway()
|
||||
.then(url => {
|
||||
this.createWS(url);
|
||||
return token;
|
||||
self.token = self.client.options.bot && !self.token.startsWith("Bot ") ? `Bot ${self.token}` : self.token;
|
||||
self.createWS(url);
|
||||
return self.token;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user