blob: e64335d35b7a8f85c30ac0e230b5104f988241ac (
plain) (
blame)
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
|
const Discord = require('discord.js');
const WS = require('./ws/ws.js');
const client = new Discord.Client();
const prefix = 'uppity!';
var ws = new WS('1337', process.env.PORT, client);
client.once('ready', () => {
console.log(`Started bot: ${client.user.tag} (ID: ${client.user.id})\nCurrently running on ${client.guilds.cache.size} server(s).`);
client.user.setActivity('@uwufier#7995', {
type: 'WATCHING'
});
});
client.on('error', console.error);
client.on('message', msg => {
function prefixCheck() { if (msg.content.startsWith(prefix)) return true; }
if (prefixCheck()) {
console.log(msg.member.user.tag, 'says', msg.content.toLowerCase(), 'in #' + msg.channel.name);
var args = msg.content.slice(prefix.length).split(/ +/);
var cmd = args.shift().toLowerCase();
}
if (cmd == 'status' || cmd == 's') {
let status = msg.guild.member('699473263998271489').presence.status;
if (status === 'online') {
let statusEnd = 'online';
return msg.reply('<@699473263998271489> is **online**.');
} else {
let statusEnd = 'offline';
return msg.reply('<@699473263998271489> is **offline**.');
}
}
});
client.login('NzA1NTM3MTA0MzM5NDAyODE1.XqtJCg.T4knAU8cyoCN37nHyE1G3vQvLB8');
|