debug logging

This commit is contained in:
Skillz
2020-05-11 13:18:24 -04:00
parent ff0c3814af
commit b76e5bc142
2 changed files with 2 additions and 4 deletions

View File

@@ -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(
{

View File

@@ -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") {