diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts
index 60a82d8f..15021118 100644
--- a/src/gateway/Server.ts
+++ b/src/gateway/Server.ts
@@ -2,9 +2,8 @@ import { closeDatabase, Config, getOrInitialiseDatabase, initEvent } from "@foss
import dotenv from "dotenv";
import http from "http";
import ws from "ws";
+import { PluginConfig } from "../util/plugin/PluginConfig";
import { Connection } from "./events/Connection";
-import http from "http";
-import { PluginConfig } from "util/plugin/PluginConfig";
dotenv.config();
export class Server {
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index ac6955fd..a2ce9ff5 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -77,7 +77,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
// TODO: check if status is only one of: online, dnd, offline, idle
status: identify.presence?.status || "offline", //does the session always start as online?
client_info: {
- //TODO read from identity
+ //TODO: read from identity
client: "desktop",
os: identify.properties?.os,
version: 0
@@ -147,7 +147,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
const channels = recipients.map((x) => {
// @ts-ignore
x.channel.recipients = x.channel.recipients?.map((x) => x.user);
- //TODO is this needed? check if users in group dm that are not friends are sent in the READY event
+ //TODO: is this needed? check if users in group dm that are not friends are sent in the READY event
users = users.concat(x.channel.recipients as unknown as User[]);
if (x.channel.isDm()) {
x.channel.recipients = x.channel.recipients!.filter((x) => x.id !== this.user_id);
@@ -274,10 +274,10 @@ export async function onIdentify(this: WebSocket, data: Payload) {
d
});
- //TODO send READY_SUPPLEMENTAL
- //TODO send GUILD_MEMBER_LIST_UPDATE
- //TODO send SESSIONS_REPLACE
- //TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
+ //TODO: send READY_SUPPLEMENTAL
+ //TODO: send GUILD_MEMBER_LIST_UPDATE
+ //TODO: send SESSIONS_REPLACE
+ //TODO: send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
await setupListener.call(this);
}
diff --git a/src/gateway/opcodes/PresenceUpdate.ts b/src/gateway/opcodes/PresenceUpdate.ts
index ad712234..5e17bfbc 100644
--- a/src/gateway/opcodes/PresenceUpdate.ts
+++ b/src/gateway/opcodes/PresenceUpdate.ts
@@ -14,7 +14,7 @@ export async function onPresenceUpdate(this: WebSocket, { d }: Payload) {
data: {
user: await User.getPublicUser(this.user_id),
activities: presence.activities,
- client_status: {}, // TODO:
+ client_status: {}, // TODO: add client status
status: presence.status
}
} as PresenceUpdateEvent);
diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts
index 20502584..5fd7cf97 100644
--- a/src/gateway/opcodes/VoiceStateUpdate.ts
+++ b/src/gateway/opcodes/VoiceStateUpdate.ts
@@ -58,9 +58,9 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) {
});
}
- //TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
- //TODO the member.user should only have these properties: avatar, discriminator, id, username
- //TODO this may fail
+ //TODO: the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
+ //TODO: the member.user should only have these properties: avatar, discriminator, id, username
+ //TODO: this may fail
voiceState.member = await Member.findOneOrFail({
where: { id: voiceState.user_id, guild_id: voiceState.guild_id },
relations: ["user", "roles"]
|