mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
simplify client destruction
This commit is contained in:
@@ -59,10 +59,10 @@ class ClientManager {
|
||||
|
||||
destroy() {
|
||||
return new Promise((resolve) => {
|
||||
this.client.ws.destroy();
|
||||
if (!this.client.user.bot) {
|
||||
this.client.rest.methods.logout().then(resolve);
|
||||
} else {
|
||||
this.client.ws.destroy();
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user