Added cron event handler

This commit is contained in:
2023-12-29 01:42:03 +01:00
parent b8d138bb0c
commit 7376c7ddd9
7 changed files with 495 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import config from "./Config"
import { redis } from "./Redis"
import { connect } from "mongoose"
import init from "./Init"
import { loadCronEvents } from "./Cron"
const client = new Client()
export default class Illegitimate {
@@ -10,13 +11,11 @@ export default class Illegitimate {
async start() {
init()
client.start()
loadCronEvents()
redis.on("ready", () => {
console.log("Connected to Redis")
})
connect(config.prod.mongoURI!, {}).then(() => {
console.log("Connected to MongoDB")
})