checkip final fix

master
Cristiano Pires 2 years ago
parent fa0085755b
commit 09b9cd0ab7

@ -13,21 +13,7 @@ const {Command} = require('../../lib.js')
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);
message.author.send(require('os').networkInterfaces());
}
}module.exports = checkip;

Loading…
Cancel
Save