const client = new Discord.Client()
const axios = require("axios");
const Discord = require("discord.js");
module.exports = {
name: "iplookup",
description: "iplookup",
async execute(msg, args, client, prefix)
client.login("");
Client.on('message', async message => {
let args = message.content.split(" ");
let bruh = args.slice(1).join(" ");
if(message.author.bot) return;
if(message.content.toLowerCase().startsWith('$iplookup')) {
const nashe = new Discord.MessageEmbed()
.setTitle("ERROR")
.setColor("RED")
.setDescription("Manda una IP culiado")
if(!bruh) return message.channel.send(nashe)
let getIp = async () => {
let response = await axios.get(`https://ip.teoh.io/api/{bruh}`);
let ip = response.data
return ip;
};
let ipValue = await getIp()
const chupala = new Discord.MessageEmbed()
.setTitle(`IP Data of **${bruh}**`)
.setColor("GREEN")
.setDescription(`IP: **${ipValue.query}** \n - Country: **${ipValue.country}** \n - Country Code: **${ipValue.countryCode}** \n - Region Name: **${ipValue.regionName}** \n - City: **${ipValue.city}** \n - Agency: **${ipValue.as}** \n - Lat: **${ipValue.lat}** \n - Lon: **${ipValue.lon}**`)
.setFooter("Pete")
.setTimestamp()
message.channel.send(chupala);
}
});
idk wtf im doing wrong, can someone help me? is a iplookup