i hate stupid errors, its finally fixed!
This commit is contained in:
parent
1f0b990124
commit
565b117969
@ -23,20 +23,21 @@ export const useTetherWS = (
|
|||||||
/**
|
/**
|
||||||
* Establish a connection with the API.
|
* Establish a connection with the API.
|
||||||
*/
|
*/
|
||||||
function connect() {
|
const connect = () => {
|
||||||
console.log("[Tether] Connecting to the WebSocket server...");
|
console.log("[Tether] Connecting to the WebSocket server...");
|
||||||
socket = new WebSocket(url); // Connect to the gateway
|
socket = new WebSocket(url); // Connect to the gateway
|
||||||
socket.addEventListener("open", () => {
|
socket.addEventListener("open", () => {
|
||||||
console.log("[Tether] WebSocket connection established!");
|
console.log(
|
||||||
console.log("attempt to lsn to", snowflake);
|
"[Tether] WebSocket connection established!",
|
||||||
|
snowflake
|
||||||
|
);
|
||||||
});
|
});
|
||||||
// socket.addEventListener("close", connect);
|
socket.addEventListener("close", connect);
|
||||||
|
|
||||||
socket.addEventListener("message", (event) => {
|
socket.addEventListener("message", (event) => {
|
||||||
console.log("data:", event.data);
|
console.log("data:", event.data);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
connect();
|
connect();
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
|
@ -3,4 +3,5 @@ export * from "@/hook/websocket";
|
|||||||
|
|
||||||
// Types
|
// Types
|
||||||
export * from "@/types/config";
|
export * from "@/types/config";
|
||||||
|
export * from "@/types/snowflake";
|
||||||
export * from "@/types/user";
|
export * from "@/types/user";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user