mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Clean up a bunch of promise stuff
This commit is contained in:
@@ -40,7 +40,7 @@ class ClientManager {
|
||||
resolve(token);
|
||||
this.client.clearTimeout(timeout);
|
||||
});
|
||||
}).catch(reject);
|
||||
}, reject);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,10 +58,10 @@ class ClientManager {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
this.client.ws.destroy();
|
||||
if (!this.client.user.bot) {
|
||||
this.client.rest.methods.logout().then(resolve, reject);
|
||||
resolve(this.client.rest.methods.logout());
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user