twitch_bot/commands/ping.js

23 lines
539 B
JavaScript

const os = require("os");
const command = {
name: "ping",
desc: "uptime",
restricted: false,
mod: false,
run: async (client, msg) => {
await client
.say(
msg.channelName,
`${msg.displayName}, Pong! Uptime: ${Math.floor(
process.uptime()
)}s Memory used: ${Math.floor(
os.totalmem() / 1024 / 1024 - os.freemem() / 1024 / 1024
)}mb / ${Math.floor(os.totalmem() / 1024 / 1024)}mb`
)
.catch((err) => console.log(err));
},
};
module.exports = { command };