-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.js
More file actions
25 lines (22 loc) · 758 Bytes
/
bot.js
File metadata and controls
25 lines (22 loc) · 758 Bytes
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
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require('./db/config.json');
const commands = require('./commands');
const game = require('./game');
const role = require('./roles');
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', async msg => {
if (!msg.author.bot) {
if (msg.content === '!play') game.play(msg, client);
if (msg.content.startsWith('.')) role.role(msg, client);
commands.rep(msg);
}
})
setInterval(function pikaDrink() {
let chan = client.channels.cache.get('566668444683206658');
pika = chan.guild.members.cache.get('489836698394427392');
chan.send(`${pika} bois de l'eau patate.`);
}, 1000 * 60 * 60);
client.login(config.token);