1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 00:23:17 +00:00

Update index.js

This commit is contained in:
MatteZ02 2019-07-22 20:47:41 +03:00
parent 1eded156f7
commit f7d19118e9

View File

@ -21,26 +21,6 @@ client.on('message', async msg => {
msg.channel.send(`My current Ping: **${Math.floor(client.ping * 10) / 10} ms**.`) msg.channel.send(`My current Ping: **${Math.floor(client.ping * 10) / 10} ms**.`)
return; return;
} }
if (msg.content === `${PREFIX}uptime`) {
var rawUptime = client.uptime;
var uptime = {};
uptime['d'] = rawUptime / 86400000;
uptime['h'] = rawUptime / 3600000;
uptime['m'] = rawUptime / 60000;
var finalUptime;
if (uptime.d < 1) {
finalUptime = `${Math.round((uptime.h + (uptime.m / 60)) * 10) / 10} hours`;
if (uptime.h < 1) {
finalUptime = `${Math.round(uptime.m * 10) / 10} minutes`;
} else {
finalUptime = `${Math.round((uptime.h + (uptime.m / 60)) * 10) / 10} hours`;
}
} else {
finalUptime = `${Math.round((uptime.d + (uptime.h / 24)) * 10) / 10} days`;
}
return msg.channel.send(`I've been up & running for **${finalUptime}.**`);
}
if (msg.content === `${PREFIX}help`) { if (msg.content === `${PREFIX}help`) {
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()
.setTitle('Commands for Musix!') .setTitle('Commands for Musix!')