- import DiscordJS, { Intents } from 'discord.js'
- import WOKCommands from 'wokcommands'
- import path from 'path'
- import dotenv from 'dotenv'
- import mongoose from 'mongoose'
- import 'dotenv/config'
- import schema from './schema'
- const client = new DiscordJS.Client({
- intents: [
- Intents.FLAGS.GUILDS,
- Intents.FLAGS.GUILD_MESSAGES,
- Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
- ],
- })
- client.on('ready', async () => {
- await mongoose.connect(
- process.env.MONGO_URI || ' ',
- {
- keepAlive: true
- }
- )
- new WOKCommands(client, {
- commandsDir: path.join(__dirname, 'commands'),
- typeScript: true,
- testServers: ['862320682973265940'],
- botOwners: ['695645133093470209'],
- })
- })
- client.login(process.env.TOKEN)