add closeWS function

This commit is contained in:
ITOH
2021-04-15 16:46:44 +02:00
parent 2c97964f0f
commit 8c52abce7f
6 changed files with 18 additions and 12 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { delay } from "../../src/util/utils.ts";
import { closeWS } from "../../src/ws/close_ws.ts";
import { ws } from "../../src/ws/ws.ts";
import { defaultTestOptions } from "./start_bot.ts";
@@ -8,7 +9,7 @@ Deno.test({
async fn() {
ws.shards.forEach((shard) => {
clearInterval(shard.heartbeat.intervalId);
shard.ws.close(3064, "Discordeno Testing Finished! Do Not RESUME!");
closeWS(shard.ws, 3061, "Discordeno Testing Finished! Do Not RESUME!");
});
await delay(3000);