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:
Mogyuchi
2023-06-09 18:59:18 +09:00
committed by GitHub
parent bc2798b8ee
commit 75308f2669
6 changed files with 12 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ client.on('ready', async () => {
} catch (error) {
console.error(error);
} finally {
client.destroy();
await client.destroy();
}
});

View File

@@ -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);
}
});

View File

@@ -20,7 +20,7 @@ client
} catch (error) {
console.error(error);
} finally {
client.destroy();
await client.destroy();
}
})
.login(token)