-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
55 lines (51 loc) · 1.49 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import DiscordJS, { Intents } from 'discord.js'
import WOKCommands from 'wokcommands'
import path from 'path'
import dotenv from 'dotenv'
dotenv.config()
const client = new DiscordJS.Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_BANS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Intents.FLAGS.GUILD_INTEGRATIONS,
Intents.FLAGS.GUILD_WEBHOOKS,
Intents.FLAGS.GUILD_INVITES,
Intents.FLAGS.GUILD_VOICE_STATES,
Intents.FLAGS.GUILD_PRESENCES,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.GUILD_MESSAGE_TYPING,
Intents.FLAGS.DIRECT_MESSAGES,
Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
Intents.FLAGS.DIRECT_MESSAGE_TYPING,
],
partials: ['CHANNEL', 'GUILD_MEMBER', 'MESSAGE', 'REACTION', 'USER'],
allowedMentions: {
parse: ['roles', 'users', 'everyone'],
repliedUser: true,
},
})
client.on('ready', () => {
console.log(`Logged in as ${client.user?.tag}!`)
const dbOptions = {
keepAlive: true,
}
new WOKCommands(client, {
commandDir: path.join(__dirname, 'commands'),
featureDir: path.join(__dirname, 'features'),
typeScript: true,
showWarns: true,
defaultLanguage: 'portuguese',
ignoreBots: true,
testServers: ['896559856746627082'],
dbOptions,
mongoUri: process.env.MONGO_URI,
botOwners: ['136460373564981248'],
debug: false,
})
.setDefaultPrefix('!')
.setColor(0xff0000)
})
client.login(process.env.TOKEN)