refactor!: rename the ws folder to gateway (#2037)

This commit is contained in:
ITOH
2022-02-11 11:21:10 +01:00
committed by GitHub
parent 8aaea9f339
commit cfbfb67c8e
22 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ on:
- "transformers/**"
- "types/**"
- "util/**"
- "ws/**"
- "gateway/**"
pull_request:
paths:
- "handlers/**"
@@ -22,7 +22,7 @@ on:
- "transformers/**"
- "types/**"
- "util/**"
- "ws/**"
- "gateway/**"
jobs:
test:

2
bot.ts
View File

@@ -31,7 +31,7 @@ import {
} from "./util/constants.ts";
import { Errors } from "./types/discordeno/errors.ts";
import { DiscordGatewayPayload, GatewayDispatchEventNames, GatewayPayload } from "./types/gateway/gatewayPayload.ts";
import { createGatewayManager, GatewayManager } from "./ws/mod.ts";
import { createGatewayManager, GatewayManager } from "./gateway/mod.ts";
import { validateLength } from "./util/validateLength.ts";
import { delay, formatImageURL, hasProperty } from "./util/utils.ts";
import { iconBigintToHash, iconHashToBigInt } from "./util/hash.ts";

2
dnt.ts
View File

@@ -31,7 +31,7 @@ await build({
},
{
name: "./gateway",
path: "ws/mod.ts",
path: "gateway/mod.ts",
},
{
name: "./types",

2
mod.ts
View File

@@ -5,4 +5,4 @@ export * from "./rest/mod.ts";
export * from "./transformers/mod.ts";
export * from "./types/mod.ts";
export * from "./util/mod.ts";
export * from "./ws/mod.ts";
export * from "./gateway/mod.ts";

View File

@@ -1,4 +1,4 @@
import { GatewayManager } from "../ws/gateway_manager.ts";
import { GatewayManager } from "../gateway/gateway_manager.ts";
export function calculateShardId(gateway: GatewayManager, guildId: bigint) {
if (gateway.maxShards === 1) return 0;