fix(WebSocketShard): don't await #destroy in error bubbling logic (#9276)

* fix(WebSocketShard): don't await #destroy in error bubbling logic

* fix: properly throw abort errors

* chore: vlad's nit

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
DD
2023-03-25 14:49:35 +02:00
committed by GitHub
parent ad31edc7aa
commit 519825a651
2 changed files with 9 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ pnpm add @discordjs/ws
## Example usage
```ts
import { WebSocketManager, WebSocketShardEvents } from '@discordjs/ws';
import { WebSocketManager, WebSocketShardEvents, CompressionMethod } from '@discordjs/ws';
import { REST } from '@discordjs/rest';
const rest = new REST().setToken(process.env.DISCORD_TOKEN);
@@ -48,6 +48,8 @@ const manager = new WebSocketManager({
token: process.env.DISCORD_TOKEN,
intents: 0, // for no intents
rest,
// uncomment if you have zlib-sync installed and want to use compression
// compression: CompressionMethod.ZlibStream,
});
manager.on(WebSocketShardEvents.Dispatch, (event) => {