This commit is contained in:
Fran Jurmanović
2022-03-10 18:53:49 +01:00
commit 6ef57924ea
22 changed files with 2084 additions and 0 deletions

20
app.ts Normal file
View File

@@ -0,0 +1,20 @@
import { Client } from "discord.js";
import Chat from "./common/chat";
import { config as dotenv } from "dotenv";
import { Controller } from "./core";
import { ClientController } from "./controllers";
import { ENVIRONMENT } from "./constants";
import { getSettings } from "./common";
dotenv();
const environment: string = ENVIRONMENT;
const appSettings: any = getSettings(environment);
const client: Client = new Client();
const chat: Chat = new Chat(client);
const controllers = new Controller(new ClientController(client));
controllers.register();
chat.register(appSettings?.token || process.env.DEV_TOKEN || "");