-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
32 lines (29 loc) · 949 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Database from './src/Database'
import {Client, Intents} from 'discord.js'
import dotenv from 'dotenv'
import Message from './src/Handler/message'
import Ready from './src/Handler/ready'
import AddToServer from './src/Handler/addToServer'
import {keepAliver} from './keepAliver'
const main = async () => {
dotenv.config()
await Database.connect()
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_VOICE_STATES,
// Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
],
})
client.login(process.env.DISCORD_TOKEN)
const readyHandler = new Ready(client)
const messageHandler = new Message(client)
const addToServerHandler = new AddToServer(client)
readyHandler.handle()
addToServerHandler.handle()
messageHandler.handle()
}
keepAliver()
main()