mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Clean up some stuff
This commit is contained in:
@@ -13,9 +13,15 @@ class RESTMethods {
|
||||
this.rest = restManager;
|
||||
}
|
||||
|
||||
loginToken(token) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.client.manager.connectToWebSocket(token, resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
loginEmailPassword(email, password) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.client.emit('debug', 'Client launched using email and password - should use token instead');
|
||||
this.rest.client.emit('warn', 'Client launched using email and password - should use token instead');
|
||||
this.rest.client.email = email;
|
||||
this.rest.client.password = password;
|
||||
this.rest.makeRequest('post', Constants.Endpoints.login, false, { email, password })
|
||||
@@ -26,12 +32,6 @@ class RESTMethods {
|
||||
});
|
||||
}
|
||||
|
||||
loginToken(token) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.client.manager.connectToWebSocket(token, resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
logout() {
|
||||
return this.rest.makeRequest('post', Constants.Endpoints.logout, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user