-
Notifications
You must be signed in to change notification settings - Fork 4
/
Bot.js
60 lines (54 loc) 路 2.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const { AkairoClient, CommandHandler, ListenerHandler, ClientUtil, Command, SQLiteProvider } = require('discord-akairo');
const { config } = require('dotenv');
const sqlite = require('sqlite');
const BotColors = require('./Util/Colors');
config();
class AkaiClient extends AkairoClient {
constructor() {
super({ ownerID: '535585397435006987' }, { disableEveryone: true })
this.commandHandler = new CommandHandler(this, {
allowMention: true,
prefix: 's!',
classToHandle: Command,
commandUtil: true,
handleEdits: true,
argumentDefaults: {
prompt: {
modifyStart: (message, str) => `${message.author}, ${str}\n\nType: \`cancel\` to cancel the command...`,
modifyRetry: (message, str) => `${message.author}, ${str}\n\nType: \`cancel\` to cancel the command...`,
cancel: `You have cancelled the command successfully.`,
timeout: 'Your time has ran out. Command was cancelled...',
ended: 'You took too many tries. Command was cancelled...',
retries: 4,
time: 30000,
},
otherwise: ""
},
ignoreCooldown: this.ownerID,
ignorePermissions: this.ownerID,
automateCategories: true,
defaultCooldown: 2000,
commandUtilLifetime: 300000,
directory: './Commands/'
});
this.listenerHandler = new ListenerHandler(this, {
directory: './Listeners/',
});
this.colors = BotColors;
this.util = new ClientUtil(this)
this.commandHandler.useListenerHandler(this.listenerHandler);
this.commandHandler.loadAll();
this.listenerHandler.setEmitters({
commandHandler: this.commandHandler,
listenerHandler: this.listenerHandler,
process: process
});
this.listenerHandler.loadAll();
}
async start() {
require('./Extensions/message');
super.login(process.env.TOKEN)
}
}
const client = new AkaiClient();
client.start();