-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
79 lines (75 loc) · 2.07 KB
/
index.js
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
require('dotenv').config()
const DiscordJS = require('discord.js')
const WOKCommands = require('wokcommands')
const client = new DiscordJS.Client({
partials: ['MESSAGE', 'CHANNEL', 'REACTION', 'USER', 'GUILD_MEMBER'],
})
const DisTube = require('distube')
client.distube = new DisTube(client, {
searchSongs: true,
emitNewSongOnly: true,
})
const token = process.env.TOKEN
const config = require('./config.json')
client.config = require('./config.json')
client.emotes = config.emoji
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`)
client.user.setActivity('RelaxÔ 💆♂️', { type: 'WATCHING' })
const messagesPath = 'messages.json'
const dbOptions = {
keepAlive: true,
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
}
// Initialize WOKCommands with specific folders and MongoDB
new WOKCommands(client, {
commandsDir: 'commands',
featureDir: 'features',
messagesPath,
showWarns: false, // Show start up warnings
dbOptions,
})
.setBotOwner('136460373564981248')
// Set your MongoDB connection path
.setMongoPath(process.env.MONGO_URI)
// Set the default prefix for your bot, it is ! by default
.setDefaultPrefix('!')
// Set the category emoji by using it's settings:
.setCategorySettings([
{
// You can change the default emojis as well
name: 'Configuration',
emoji: '🚧',
// You can also hide a category from the help menu
// Admins bypass this
hidden: true,
},
{
name: 'Dev',
emoji: '👨💻',
hidden: true,
},
{
name: 'Staff',
emoji: '👑',
},
{
name: 'Misc',
emoji: '⛏️',
},
{
name: 'Economy',
emoji: '💸',
},
{
name: 'Info',
emoji: '📃',
},
])
// Set the embed color for your bot. The default help menu will use this. This hex value can be a string too
.setColor(0xff0000)
.setDefaultLanguage('portuguese')
})
client.login(token)