mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
debug logging
This commit is contained in:
@@ -15,7 +15,6 @@ import { sendConstantHeartbeats, previousSequenceNumber } from "./gateway.ts";
|
||||
export const USELESS_ARG_TO_MAKE_DENO_CACHE_WORK = undefined;
|
||||
/** The session id is needed for RESUME functionality when discord disconnects randomly. */
|
||||
let sessionID = "";
|
||||
console.log("shard made");
|
||||
|
||||
async function resumeConnection(
|
||||
payload: object,
|
||||
@@ -74,7 +73,6 @@ export const createShard = async (
|
||||
if (data.t === "READY") {
|
||||
sessionID = (data.d as ReadyPayload).session_id;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
postMessage(
|
||||
{
|
||||
|
||||
@@ -59,9 +59,9 @@ let shardCounter = 0;
|
||||
|
||||
function createShardWorker() {
|
||||
// console.log("shard creating url", import.meta.url);
|
||||
// const path = new URL("./shard.ts", import.meta.url).toString();
|
||||
const path = new URL("./shard.ts", import.meta.url).toString();
|
||||
// console.log("shard creating path", path);
|
||||
const shard = new Worker("https://raw.githubusercontent.com/Skillz4Killz/Discordeno/master/module/shard.ts", { type: "module", deno: true });
|
||||
const shard = new Worker(path, { type: "module", deno: true });
|
||||
// console.log("shard made on manager");
|
||||
shard.onmessage = (message) => {
|
||||
if (message.data.type === "REQUEST_CLIENT_OPTIONS") {
|
||||
|
||||
Reference in New Issue
Block a user