forked from arduinodiscord/bot-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.js
41 lines (38 loc) · 1.09 KB
/
bot.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
const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo')
const Discord = require('discord.js')
const version = require('./package.json').version
const config = require('./config.json')
const embed = new Discord.MessageEmbed()
.setFooter(config.embeds.footer)
.setColor(config.embeds.color)
module.exports = {
embed
}
class MainClient extends AkairoClient {
constructor () {
super({
ownerID: ['200616508328509442', '223217915673968641']
})
this.commandHandler = new CommandHandler(this, {
directory: './commands/',
prefix: config.prefix,
defaultCooldown: 5000
})
this.listenerHandler = new ListenerHandler(this, {
directory: './listeners/'
})
this.commandHandler.useListenerHandler(this.listenerHandler)
this.listenerHandler.loadAll()
this.commandHandler.loadAll()
}
}
const client = new MainClient()
client.login(process.env.BOT_TOKEN)
client.options.fetchAllMembers = true
client.options.presence = {
status: 'online',
activity: {
name: `Arduino | v${version}`,
type: 'WATCHING'
}
}