IP Command, Update Fun Info

This commit is contained in:
Dragon Fire
2020-02-17 14:41:14 -05:00
parent 3d4813b909
commit 0c74db79c7
3 changed files with 30 additions and 5 deletions
+22
View File
@@ -0,0 +1,22 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class IpCommand extends Command {
constructor(client) {
super(client, {
name: 'ip',
group: 'util',
memberName: 'ip',
description: 'Responds with the IP address Xiao\'s server is running on.',
guarded: true,
ownerOnly: true
});
}
async run(msg) {
const { body } = await request
.get('https://api.ipify.org/')
.query({ format: 'json' });
return msg.say(body.ip);
}
};