-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (31 loc) · 949 Bytes
/
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
const Discord = require('discord.js');
require('dotenv').config();
const client = new Discord.Client();
const prefix = process.env.PREFIX;
const botCommands = require('./methods/botCommands');
const keepUptime = require('./methods/keepGlitchServerUptime');
keepUptime;
client.once('ready', () => {
console.log('Frank Bot is ONLINE!');
});
client.on('message', message => {
if (message.content.includes('703028698214957147')) {
botCommands.checkToSmokeMore(message);
}
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ /);
const command = args.shift().toLowerCase();
if (command === 'help') {
botCommands.help(message);
}
if (command === 'server') {
botCommands.serverInfo(message);
}
if (command === 'roll') {
botCommands.rollDice(message)
}
if (command === 'drinkwith') {
botCommands.getRandomDrink(args, message);
}
});
client.login();