twitch_bot/commands/ping.js

26 lines
660 B
JavaScript
Raw Normal View History

2023-02-04 12:56:15 +01:00
const os = require("os");
const prisma = require("../clients/prisma");
2023-02-04 12:56:15 +01:00
2023-02-01 12:04:14 +01:00
const command = {
name: "ping",
desc: "uptime",
2023-02-02 23:37:42 +01:00
restricted: false,
2023-02-04 12:56:15 +01:00
mod: false,
2023-02-01 12:04:14 +01:00
run: async (client, msg) => {
2023-02-11 13:48:05 +01:00
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 Joined channels count: ${
client.joinedChannels.size
} Megis drinkers count: ${await prisma.megis.count()}`
2023-02-11 13:48:05 +01:00
);
2023-02-01 12:04:14 +01:00
},
};
2023-02-01 22:11:48 +01:00
module.exports = { command };