2023-09-10 18:56:17 +00:00
|
|
|
// Load environment variables from .env file
|
2023-09-04 16:55:48 +00:00
|
|
|
import "https://deno.land/std@0.201.0/dotenv/load.ts";
|
2023-09-07 20:43:40 +00:00
|
|
|
|
2023-09-10 18:56:17 +00:00
|
|
|
// Setup logging
|
|
|
|
import { Log } from "./deps.ts";
|
|
|
|
Log.setup({
|
2023-09-07 20:43:40 +00:00
|
|
|
handlers: {
|
2023-09-10 18:56:17 +00:00
|
|
|
console: new Log.handlers.ConsoleHandler("DEBUG"),
|
2023-09-07 20:43:40 +00:00
|
|
|
},
|
|
|
|
loggers: {
|
2023-09-10 18:56:17 +00:00
|
|
|
default: { level: "DEBUG", handlers: ["console"] },
|
2023-09-07 20:43:40 +00:00
|
|
|
},
|
|
|
|
});
|
2023-09-03 19:06:20 +00:00
|
|
|
|
2023-09-10 18:56:17 +00:00
|
|
|
// Main program logic
|
|
|
|
import { bot } from "./bot/mod.ts";
|
|
|
|
import { runAllTasks } from "./tasks/mod.ts";
|
2023-09-04 16:55:48 +00:00
|
|
|
await Promise.all([
|
|
|
|
bot.start(),
|
2023-09-10 18:56:17 +00:00
|
|
|
runAllTasks(),
|
2023-09-03 19:06:20 +00:00
|
|
|
]);
|