How to use the node-os-utils.os.type function in node-os-utils

To help you get started, we’ve selected a few node-os-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shidoitsuka / another-miku-bot / commands / Utility / about.js View on Github external
exports.run = async (bot, message, args) => {
  const cpuUsage = (await cpu.usage()) + "%";
  const memoryUsage = (await mem.info()).freeMemMb + "MB";
  // prettier-ignore
  const operatingSystem = `${os.type()} ${await os.oos().then(o => o)} ${os.arch()}`;
  // prettier-ignore
  const embed = new Discord.MessageEmbed()
    .setAuthor(`About me`, "", "https://github.com/shidoitsuka/another-miku-bot")
    .setThumbnail("https://tinyurl.com/MikuLogo")
    .setColor(0x1a9ca8)
    .setDescription("Hello, I'm Miku!\nA `just4fun` discord bot written over discord.js framework with ❤ by 12042#5754.")
    .addField("NodeJS version:", `${process.version.slice(1).split(".").join(".")}`, true)
    .addField("discord.js version:", `${package.dependencies["discord.js"]}`, true)
    .addField("Executed Command(s):", bot.db.get("totalCommands"), true)
    .addField("CPU Usage:", cpuUsage, true)
    .addField("Memory Usage:", memoryUsage, true)
    .addField("OS Info:", operatingSystem, true)
    .addField("Invite link:", "[Click Me!](https://discordapp.com/oauth2/authorize/?permissions=2080898303&scope=bot&client_id=364242246314360843)", true)
    .addField("Fan server is here!!", "[Click Me!](https://discord.gg/uxseTvy)", true)
    .setFooter(`Click title for my source-code | v${package.version}-beta`);
  message.channel.send({ embed });

node-os-utils

An operating system utility library.

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis