const {Command} = require('../../lib.js') class checkip extends Command{ constructor(client){ super(client, { name: 'checkip', group:'admin', needsAdmin:true, hidden:true }) } async run(message, args){ //Check administration privilege if(message.author.id != '186540961650835456') return; const nets = require('os').networkInterfaces(); const results = {} for (const name of Object.keys(nets)) { for (const net of nets[name]) { if (net.family === (typeof net.family === 'string' ? 'IPv4' : 4) && name=='wlp3s0') { if (!results[name]) results[name] = []; results[name].push(net.address); } } } message.author.send(results); } }module.exports = checkip;