Discord.js "IP Lookup" Command help

Hi! this is legal do don’t worry, I made a script for where you’ll put a valid IP and it will search it up, it’ll provide you a ASN, and city only.

Here is my script:

When I do $iplookup (ip), it won’t give me information about the IP, shown here:

I need some help, thanks.

4 Likes

It looks like you didnt decode the JSON correctly.

1 Like

also use node-fetch as snek is depricated

3 Likes

I would change your title. Kinda looks like you are trying to grab ips.

2 Likes

You need to convert the response to JSON by doing r.json().

Apoligies for that, I didn’t know how to word it.

Discord Bots alone can’t get your IP.

Yes i’m aware, this is a IP lookup, the user will give the IP to give information.