🎨 create start.ts

This commit is contained in:
Flam3rboy
2021-05-31 00:51:54 +02:00
parent 3b9e4a23c5
commit e12197d568
5 changed files with 15 additions and 14 deletions
+1 -9
View File
@@ -1,9 +1 @@
process.on("uncaughtException", console.error);
process.on("unhandledRejection", console.error);
import { Server } from "./Server";
import { config } from "dotenv";
config();
const server = new Server();
server.listen();
export * from "./Server";
+1 -1
View File
@@ -62,7 +62,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
}) as MemberDocument[][];
const user_guild_settings_entries = members.map((x) => x.settings);
const channels = await ChannelModel.find({ recipients: this.user_id }).exec();
const channels = await ChannelModel.find({ recipient_ids: this.user_id }).exec();
const user = await UserModel.findOne({ id: this.user_id }).exec();
if (!user) return this.close(CLOSECODES.Authentication_failed);
+9
View File
@@ -0,0 +1,9 @@
process.on("uncaughtException", console.error);
process.on("unhandledRejection", console.error);
import { Server } from "./Server";
import { config } from "dotenv";
config();
const server = new Server();
server.listen();