-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
72 lines (57 loc) · 1.74 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// import "reflect-metadata";
// import "dotenv/config";
// import { Database } from "quickmongo";
// import { Client, Partials, GatewayIntentBits } from "discord.js";
// const db = new Database(
// "mongodb+srv://"
// ); ///process.env.MONGO!);
// const client = new Client({
// intents: [
// GatewayIntentBits.Guilds,
// GatewayIntentBits.GuildMessages,
// GatewayIntentBits.GuildPresences,
// GatewayIntentBits.GuildMessageReactions,
// GatewayIntentBits.DirectMessages,
// GatewayIntentBits.MessageContent
// ],
// partials: [
// Partials.Channel,
// Partials.Message,
// Partials.User,
// Partials.GuildMember,
// Partials.Reaction
// ],
// allowedMentions: {
// parse: ["users"],
// repliedUser: false
// }
// });
// globalThis.storage = {
// db,
// client
// };
// async function main() {
// await db.connect();
// app.set("json spaces", 4);
// app.use(express.static("public"));
// app.use(express.json());
// app.use(express.urlencoded({ extended: true }));
// app.use(timeout("20s"));
// app.use("/api", api);
// //The 404 Route (ALWAYS Keep this as the last route)
// app.get("*", function (req: Request, res: Response) {
// if (req.accepts("html")) return res.redirect("/404.html");
// res.status(404).sendFile(
// __dirname.replace("\\dist", "") + "/public/404.html"
// );
// });
// app.all("*", function (req, res) {
// res.status(404).json({
// error: "No routes found."
// });
// });
// app.listen(process.env.PORT!, () => console.log("opened!"));
// }
// main();
// function a() {}
// a.bind;