process memory usage javascript
const arr = [1, 2, 3, 4, 5, 6, 9, 7, 8, 9, 10];
arr.reverse();
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`The script uses approximately ${Math.round(used * 100) / 100} MB`);
process memory usage javascript
const arr = [1, 2, 3, 4, 5, 6, 9, 7, 8, 9, 10];
arr.reverse();
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`The script uses approximately ${Math.round(used * 100) / 100} MB`);
node js check ram usage
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require("./config.json")
client.on("ready", () => {
console.log(`Bot Foi Iniciado, com ${client.users.cache.size} usuários, em ${client.channels.cache.size} canais, em ${client.guilds.cache.size} servidores.`);
client.user.setActivity(`Dinheiro Na Putaria`);
client.user.setUsername('Hidrz')
});
const prefix = "!";
client.on("message", async message => {
if (message.author.bot) return;
if (message.channel.type == 'dm') return;
if (!message.guild) return;
if (!message.content.toLowerCase().startsWith(config.prefix.toLowerCase())) return;
if (message.content.startsWith(`<@!${client.user.id}>`) || message.content.startsWith(`<@${client.user.id}>`)) return;
const args = message.content
.trim().slice(config.prefix.length)
.split(/ +/g);
const command = args.shift().toLowerCase();
try {
const commandFile = require(`./commands/${command}.js`)
commandFile.run(client, message, args);
} catch (err) {
console.error('Erro:' + err);
}
});
client.login(config.token)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us