Created
August 6, 2017 23:51
-
-
Save Jackzmc/0c35a026e4795a50b1729fe0dd1ee719 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
cmd:"stats", | |
aliases:["uptime",'botinfo','info'], | |
description:"Stats for JackzCo Bot", | |
parameters:[], | |
execute: (client,msg,arg) => { | |
var botName = msg.guild.members.get(client.user.id).nickname; | |
var uptime = "Moment is not installed"; | |
var since = ""; | |
if(moment) { | |
moment.locale(); | |
uptime = moment.duration(client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]'); | |
since = moment().format("MMM Do[,] Y [@] h:mm A [UTC]Z") | |
} | |
if(!botName) botName = client.user.username; | |
msg.channel.send({embed:{ | |
title:"Source Code", | |
url:'https://github.com/Jackzmc/JackzCo-Bot', | |
description:`**${botName} Statistics**\n`, | |
color:10037274, | |
fields:[ | |
{ | |
name:"❯ Uptime", | |
value:`**For** ${uptime}\n**Since** ${since}`, | |
}, | |
{ | |
name:"❯ Usage Info", | |
value:`CPU one day...%\n` + `RAM ${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB \n` + `OS ${os.platform().replace("win32","Windows").replace("linux","Linux")}`, | |
inline:true | |
}, | |
{ | |
name:"❯ Bot Info", | |
value:`Guilds: ${client.guilds.size}\n` | |
+ `Channels: ${client.channels.size}\n` | |
+ `Users: ${client.users.size}`, | |
inline:true | |
}, | |
{ | |
name:"❯ Miscellaneous", | |
value:`NODE ${process.version}\n` | |
+ `PING ${client.ping.toFixed(2)}ms` | |
} | |
], | |
footer:{ | |
text:`${botName} version ${config.getData('/version')}` | |
} | |
}}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment