summary refs log tree commit diff
path: root/src/gateway/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway/util')
-rw-r--r--src/gateway/util/Constants.ts4
-rw-r--r--src/gateway/util/Send.ts3
-rw-r--r--src/gateway/util/SessionUtils.ts4
-rw-r--r--src/gateway/util/index.ts2
4 files changed, 5 insertions, 8 deletions
diff --git a/src/gateway/util/Constants.ts b/src/gateway/util/Constants.ts
index 692f9028..78455ff8 100644
--- a/src/gateway/util/Constants.ts
+++ b/src/gateway/util/Constants.ts
@@ -22,7 +22,7 @@ export enum OPCODES {
 	Stream_Watch = 20,
 	Stream_Ping = 21,
 	Stream_Set_Paused = 22,
-	Request_Application_Commands = 24,
+	Request_Application_Commands = 24
 }
 export enum CLOSECODES {
 	Unknown_error = 4000,
@@ -39,7 +39,7 @@ export enum CLOSECODES {
 	Sharding_required,
 	Invalid_API_version,
 	Invalid_intent,
-	Disallowed_intent,
+	Disallowed_intent
 }
 
 export interface Payload {
diff --git a/src/gateway/util/Send.ts b/src/gateway/util/Send.ts
index 2a28d8e0..7826dd40 100644
--- a/src/gateway/util/Send.ts
+++ b/src/gateway/util/Send.ts
@@ -7,8 +7,7 @@ try {
 import { Payload, WebSocket } from "@fosscord/gateway";
 
 export async function Send(socket: WebSocket, data: Payload) {
-	if(process.env.WS_VERBOSE)
-		console.log(`[Websocket] Outgoing message: ${JSON.stringify(data)}`);
+	if (process.env.WS_VERBOSE) console.log(`[Websocket] Outgoing message: ${JSON.stringify(data)}`);
 	let buffer: Buffer | string;
 	if (socket.encoding === "etf") buffer = erlpack.pack(data);
 	// TODO: encode circular object
diff --git a/src/gateway/util/SessionUtils.ts b/src/gateway/util/SessionUtils.ts
index bf854042..c66c7e76 100644
--- a/src/gateway/util/SessionUtils.ts
+++ b/src/gateway/util/SessionUtils.ts
@@ -7,7 +7,5 @@ export function genVoiceToken() {
 }
 
 function genRanHex(size: number) {
-	return [...Array(size)]
-		.map(() => Math.floor(Math.random() * 16).toString(16))
-		.join("");
+	return [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join("");
 }
diff --git a/src/gateway/util/index.ts b/src/gateway/util/index.ts
index 0be5ecee..a5085228 100644
--- a/src/gateway/util/index.ts
+++ b/src/gateway/util/index.ts
@@ -1,5 +1,5 @@
 export * from "./Constants";
+export * from "./Heartbeat";
 export * from "./Send";
 export * from "./SessionUtils";
-export * from "./Heartbeat";
 export * from "./WebSocket";