2021-12-24 14:55:28 +00:00
|
|
|
import { CoreClient } from "./client/client";
|
2021-11-28 14:24:53 +00:00
|
|
|
import * as dotenv from "dotenv";
|
2021-12-24 14:55:28 +00:00
|
|
|
import Register from "./Register";
|
2021-11-28 14:24:53 +00:00
|
|
|
|
|
|
|
dotenv.config();
|
|
|
|
|
2021-12-02 11:44:56 +00:00
|
|
|
const requiredConfigs = [
|
|
|
|
"EMBED_COLOUR",
|
|
|
|
"EMBED_COLOUR_ERROR",
|
|
|
|
"ROLES_MODERATOR",
|
|
|
|
"ROLES_MUTED",
|
|
|
|
"CHANNELS_LOGS_MESSAGE",
|
|
|
|
"CHANNELS_LOGS_MEMBER",
|
|
|
|
"CHANNELS_LOGS_MOD",
|
2021-12-02 14:36:24 +00:00
|
|
|
"COMMANDS_ROLE_ROLES",
|
|
|
|
"COMMANDS_RULES_FILE"
|
2021-12-02 11:44:56 +00:00
|
|
|
];
|
2021-11-29 11:27:44 +00:00
|
|
|
|
2021-12-02 11:44:56 +00:00
|
|
|
requiredConfigs.forEach(config => {
|
|
|
|
if (!process.env[config]) {
|
|
|
|
throw `${config} is required in .env`;
|
|
|
|
}
|
|
|
|
});
|
2021-11-28 14:24:53 +00:00
|
|
|
|
|
|
|
const client = new CoreClient();
|
2021-12-24 14:55:28 +00:00
|
|
|
|
|
|
|
Register.RegisterCommands(client);
|
|
|
|
Register.RegisterEvents(client);
|
|
|
|
|
2021-11-28 14:24:53 +00:00
|
|
|
client.start();
|