xyter/src/index.ts
2022-04-10 19:57:30 +00:00

28 lines
721 B
TypeScript

// Dependencies
import { Client, Intents } from "discord.js"; // discord.js
import database from "./helpers/database";
import events from "./handlers/events";
import commands from "./handlers/commands";
import locale from "./handlers/locale";
import schedules from "./handlers/schedules";
import config from "../config.json"; // config.json
(async () => {
// Initialize discord.js client
const client = new Client({
intents: [
Intents?.FLAGS?.GUILDS,
Intents?.FLAGS?.GUILD_MESSAGES,
Intents?.FLAGS?.GUILD_MEMBERS,
],
});
await database();
await locale();
await events(client);
await commands(client);
await schedules(client);
await client?.login(config?.bot?.token);
})();