wolfyflutter

temp delete spec

Dec 17th, 2025
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. import { sendText, tag, Category, sendFancyText, msToReadableTime } from '../helper.js'
  2. import os from 'node:os'
  3.  
  4.  
  5.  
  6. async function handler({sock, m, text, jid, prefix, command }) {
  7. const bullet = global.bullet || '↗️'
  8. const cpus = os.cpus()
  9. const arch = bullet + 'arch ' + os.arch()
  10. const cpu_cores = bullet + 'core ' + cpus.length + ' core'
  11. const cpu_name = bullet + 'cpu ' + cpus[0].model
  12. const os_version = bullet + 'os ' + os.version()
  13.  
  14. const toGB = (byte) => (byte/1073741824).toFixed(2) + ' GB'
  15. const ramTotal = os.totalmem()
  16. const ramFree = os.freemem()
  17. const ramUsage = ramTotal - ramFree
  18.  
  19. const ram = `${bullet}RAM ${toGB(ramTotal)}`
  20. const node_version = bullet + 'node ' + process.version
  21.  
  22. const ram_usage = `${bullet}ram usage ${(ramUsage/ramTotal*100).toFixed(0)}% used. ${toGB(ramFree)} free.`
  23. const nodeRuntime = bullet + 'bot runtime ' + msToReadableTime(parseInt(process.uptime())*1000)
  24. const hostRuntime = bullet + 'host runtime ' + msToReadableTime(parseInt(os.uptime())*1000)
  25.  
  26. const hardware = cpu_name + '\n' + cpu_cores + '\n' + ram
  27. const software = os_version + '\n' + arch + '\n' + node_version
  28. const system = hostRuntime + '\n' + ram_usage + '\n\n' + nodeRuntime
  29.  
  30. const print = '*hardware*\n' + hardware + '\n\n*software*\n' + software + '\n\n*system*\n' + system
  31. return await sendFancyText(jid, print, 'angelina bot', 'spesifikasi hardware dan software',null,false)
  32.  
  33. }
  34.  
  35. //handler.bypassPrefix = true
  36.  
  37. handler.pluginName = 'spec'
  38. handler.command = ['spec']
  39. handler.alias = []
  40. handler.category = [Category.BOT]
  41. handler.help = 'liat spesifikasi hardware dan software'
  42.  
  43. export default handler
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment