Update IP Info Command

This commit is contained in:
Daniel Odendahl Jr
2017-09-23 21:04:33 +00:00
parent 026d2568e6
commit f44f383397
2 changed files with 9 additions and 7 deletions
+8 -6
View File
@@ -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.');
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "42.6.0",
"version": "42.6.1",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {