🎨 create start.ts
This commit is contained in:
+1
-9
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
Reference in New Issue
Block a user