i hate stupid errors, its finally fixed!

This commit is contained in:
Braydon 2024-09-09 20:39:24 -04:00
parent 1f0b990124
commit 565b117969
2 changed files with 8 additions and 6 deletions

@ -23,20 +23,21 @@ export const useTetherWS = (
/**
* Establish a connection with the API.
*/
function connect() {
const connect = () => {
console.log("[Tether] Connecting to the WebSocket server...");
socket = new WebSocket(url); // Connect to the gateway
socket.addEventListener("open", () => {
console.log("[Tether] WebSocket connection established!");
console.log("attempt to lsn to", snowflake);
console.log(
"[Tether] WebSocket connection established!",
snowflake
);
});
// socket.addEventListener("close", connect);
socket.addEventListener("close", connect);
socket.addEventListener("message", (event) => {
console.log("data:", event.data);
});
}
};
connect();
// Cleanup

@ -3,4 +3,5 @@ export * from "@/hook/websocket";
// Types
export * from "@/types/config";
export * from "@/types/snowflake";
export * from "@/types/user";