change: move closeWS & sendShardMessage to ws object

This commit is contained in:
ITOH
2021-05-06 15:28:42 +02:00
parent c6a44c9665
commit fb8035c4ef
8 changed files with 18 additions and 21 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { DiscordGatewayOpcodes } from "../../types/codes/gateway_opcodes.ts";
import type { StatusUpdate } from "../../types/gateway/status_update.ts";
import { sendShardMessage } from "../../ws/send_shard_message.ts";
import { ws } from "../../ws/ws.ts";
export function editBotStatus(data: Omit<StatusUpdate, "afk" | "since">) {
@@ -11,7 +10,7 @@ export function editBotStatus(data: Omit<StatusUpdate, "afk" | "since">) {
`Running forEach loop in editBotStatus function.`,
);
sendShardMessage(shard, {
ws.sendShardMessage(shard, {
op: DiscordGatewayOpcodes.StatusUpdate,
d: {
since: null,