diff --git a/commands/search/ip-info.js b/commands/search/ip-info.js index d4928c51..ba40f860 100644 --- a/commands/search/ip-info.js +++ b/commands/search/ip-info.js @@ -30,17 +30,19 @@ module.exports = class IPInfoCommand extends Command { .setURL(`https://ipinfo.io/${ip}`) .setTitle(body.ip) .addField('❯ Hostname', - body.hostname, true) + body.hostname || 'N/A') .addField('❯ Location', - body.loc, true) + body.loc || 'N/A', true) .addField('❯ Organization', - body.org, true) + body.org || 'N/A', true) + .addField('❯ Zip', + body.postal || 'N/A', true) .addField('❯ City', - `${body.city} (${body.postal})`, true) + body.city || 'N/A', true) .addField('❯ Region', - body.region, true) + body.region || 'N/A', true) .addField('❯ Country', - body.country, true); + body.country || 'N/A', true); return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); diff --git a/package.json b/package.json index 02f830f0..569344be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "42.6.0", + "version": "42.6.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {