mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
fix(WebSocketManager): await WebSocket destroy (#9519)
fix(WebSocketManager): await ws destroy Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,7 @@ client.on('ready', async () => {
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
client.destroy();
|
||||
await client.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ process.send(123);
|
||||
client.on('ready', () => {
|
||||
console.log('Ready', client.options.shards);
|
||||
if (client.options.shards === 0) {
|
||||
setTimeout(() => {
|
||||
setTimeout(async () => {
|
||||
console.log('kek dying');
|
||||
client.destroy();
|
||||
await client.destroy();
|
||||
}, 5_000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ client
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
client.destroy();
|
||||
await client.destroy();
|
||||
}
|
||||
})
|
||||
.login(token)
|
||||
|
||||
Reference in New Issue
Block a user