const util = require(`util`) exports.help = { isim: 'code', ek: 'eval' }; exports.run = (client, message, args) => { try{ if(!["gelistiriciID"].includes(message.author.id)) return message.reply("`code` komutunu kullanmak için gerekli izne sahip değilsiniz!").catch(); if(args[0] === "process.env.TOKEN" || args[0] === "client.token) return; try{ let toEval = args.join(" "); let evaluated = eval(toEval); if(!toEval) return message.channel.send("```Command is ready!```").catch(); evaluated = util.inspect(evaluated); for(let i = 0; i < evaluated.length; i += 2000) { let hrstart = process.hrtime(); let hrDiff; hrDiff = process.hrtime(hrstart); const toSend = evaluated.substring(i, Math.min(evaluated.length, i + 2000)); return message.channel.send(`_Executed in ${hrDiff[0] > 0 ? `${hrDiff[0]}s` : ""}${hrDiff[1] / 1000000}ms._ ` +"```js\n"+toSend+"\n```").catch(); }}catch(err){ let hrstart = process.hrtime(); let hrDiff; hrDiff = process.hrtime(hrstart); message.channel.send(`_Executed in ${hrDiff[0] > 0 ? `${hrDiff[0]}s` : ""}${hrDiff[1] / 1000000}ms._ \`\`\`xl\n${err}\n\`\`\``).catch(); }}catch(e){ message.reply("Komutu kullanırken bir hata oluştu!\nKomutun çalışmamasına sebep olan hata: `"+e+"`").catch(); } };