forked from pinks/eris
1
0
Fork 0
eris/main.ts

25 lines
623 B
TypeScript
Raw Normal View History

2023-09-04 16:55:48 +00:00
import "https://deno.land/std@0.201.0/dotenv/load.ts";
import { bot } from "./bot.ts";
2023-09-06 17:51:52 +00:00
import { processQueue, returnHangedJobs } from "./queue.ts";
import { log } from "./deps.ts";
log.setup({
handlers: {
console: new log.handlers.ConsoleHandler("INFO", {
formatter: (record) =>
`[${record.levelName}] ${record.msg} ${
record.args.map((arg) => JSON.stringify(arg)).join(" ")
} (${record.datetime.toISOString()})`,
}),
},
loggers: {
default: { level: "INFO", handlers: ["console"] },
},
});
2023-09-03 19:06:20 +00:00
2023-09-04 16:55:48 +00:00
await Promise.all([
bot.start(),
processQueue(),
2023-09-06 17:51:52 +00:00
returnHangedJobs(),
2023-09-03 19:06:20 +00:00
]);