Dev (#12)
* health check * Update Dockerfile * simplifying the deployment * Update Bot.js makes the find team command public * test (#9) * Dev (#7) * health check * Update Dockerfile * simplifying the deployment * Dev (#8) * health check * Update Dockerfile * simplifying the deployment * Update Bot.js makes the find team command public * Update PlayerService.js * massive update???? could break stuff * Update Bot.js update
This commit is contained in:
19
node_modules/@discordjs/ws/dist/index.js
generated
vendored
19
node_modules/@discordjs/ws/dist/index.js
generated
vendored
@@ -37,6 +37,7 @@ __export(src_exports, {
|
||||
DefaultWebSocketManagerOptions: () => DefaultWebSocketManagerOptions,
|
||||
Encoding: () => Encoding,
|
||||
ImportantGatewayOpcodes: () => ImportantGatewayOpcodes,
|
||||
KnownNetworkErrorCodes: () => KnownNetworkErrorCodes,
|
||||
SimpleContextFetchingStrategy: () => SimpleContextFetchingStrategy,
|
||||
SimpleIdentifyThrottler: () => SimpleIdentifyThrottler,
|
||||
SimpleShardingStrategy: () => SimpleShardingStrategy,
|
||||
@@ -498,7 +499,7 @@ var SimpleIdentifyThrottler = class {
|
||||
await state.queue.wait({ signal });
|
||||
try {
|
||||
const diff = state.resetsAt - Date.now();
|
||||
if (diff <= 5e3) {
|
||||
if (diff > 0 && diff <= 5e3) {
|
||||
const time = diff + Math.random() * 1500;
|
||||
await (0, import_promises.setTimeout)(time);
|
||||
}
|
||||
@@ -518,14 +519,14 @@ var CompressionMethod = /* @__PURE__ */ ((CompressionMethod2) => {
|
||||
CompressionMethod2["ZlibStream"] = "zlib-stream";
|
||||
return CompressionMethod2;
|
||||
})(CompressionMethod || {});
|
||||
var DefaultDeviceProperty = `@discordjs/ws 1.1.1`;
|
||||
var DefaultDeviceProperty = `@discordjs/ws 1.2.3`;
|
||||
var getDefaultSessionStore = (0, import_util.lazy)(() => new import_collection4.Collection());
|
||||
var DefaultWebSocketManagerOptions = {
|
||||
async buildIdentifyThrottler(manager) {
|
||||
const info = await manager.fetchGatewayInformation();
|
||||
return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency);
|
||||
},
|
||||
buildStrategy: (manager) => new SimpleShardingStrategy(manager),
|
||||
buildStrategy: /* @__PURE__ */ __name((manager) => new SimpleShardingStrategy(manager), "buildStrategy"),
|
||||
shardCount: null,
|
||||
shardIds: null,
|
||||
largeThreshold: null,
|
||||
@@ -566,6 +567,7 @@ function getInitialSendRateLimitState() {
|
||||
};
|
||||
}
|
||||
__name(getInitialSendRateLimitState, "getInitialSendRateLimitState");
|
||||
var KnownNetworkErrorCodes = /* @__PURE__ */ new Set(["ECONNRESET", "ECONNREFUSED", "ETIMEDOUT", "EAI_AGAIN"]);
|
||||
|
||||
// src/ws/WebSocketShard.ts
|
||||
var getZlibSync = (0, import_util2.lazy)(async () => import("zlib-sync").then((mod) => mod.default).catch(() => null));
|
||||
@@ -614,7 +616,7 @@ var WebSocketShard = class extends import_async_event_emitter.AsyncEventEmitter
|
||||
lastHeartbeatAt = -1;
|
||||
// Indicates whether the shard has already resolved its original connect() call
|
||||
initialConnectResolved = false;
|
||||
// Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET)
|
||||
// Indicates if we failed to connect to the ws url
|
||||
failedToConnectDueToNetworkError = false;
|
||||
sendQueue = new import_async_queue2.AsyncQueue();
|
||||
timeoutAbortControllers = new import_collection5.Collection();
|
||||
@@ -1062,7 +1064,7 @@ var WebSocketShard = class extends import_async_event_emitter.AsyncEventEmitter
|
||||
}
|
||||
}
|
||||
onError(error) {
|
||||
if ("code" in error && ["ECONNRESET", "ECONNREFUSED"].includes(error.code)) {
|
||||
if ("code" in error && KnownNetworkErrorCodes.has(error.code)) {
|
||||
this.debug(["Failed to connect to the gateway URL specified due to a network error"]);
|
||||
this.failedToConnectDueToNetworkError = true;
|
||||
return;
|
||||
@@ -1162,9 +1164,7 @@ var WebSocketShard = class extends import_async_event_emitter.AsyncEventEmitter
|
||||
}
|
||||
}
|
||||
debug(messages) {
|
||||
const message = `${messages[0]}${messages.length > 1 ? `
|
||||
${messages.slice(1).map((m) => ` ${m}`).join("\n")}` : ""}`;
|
||||
this.emit("debug" /* Debug */, { message });
|
||||
this.emit("debug" /* Debug */, { message: messages.join("\n ") });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1476,7 +1476,7 @@ var WebSocketManager = class extends import_async_event_emitter2.AsyncEventEmitt
|
||||
};
|
||||
|
||||
// src/index.ts
|
||||
var version = "1.1.1";
|
||||
var version = "1.2.3";
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
CloseCodes,
|
||||
@@ -1485,6 +1485,7 @@ var version = "1.1.1";
|
||||
DefaultWebSocketManagerOptions,
|
||||
Encoding,
|
||||
ImportantGatewayOpcodes,
|
||||
KnownNetworkErrorCodes,
|
||||
SimpleContextFetchingStrategy,
|
||||
SimpleIdentifyThrottler,
|
||||
SimpleShardingStrategy,
|
||||
|
||||
Reference in New Issue
Block a user