Show's website whois

This commit is contained in:
Loïc Bersier 2019-06-21 03:25:22 +02:00
parent 84ef4456de
commit fb780ccee1

31
commands/utility/whois.js Normal file
View file

@ -0,0 +1,31 @@
const { Command } = require('discord-akairo');
const whois = require('whois');
class whoisCommand extends Command {
constructor() {
super('whois', {
aliases: ['whois'],
category: 'utility',
args: [
{
id: 'domain',
type: 'string',
match: 'rest',
}
],
description: {
content: 'Show\'s whois data about website. (ATTENTION, CAN BE SPAMMY)',
usage: '[website]',
examples: ['namejeff.xyz']
}
});
}
async exec(message, args) {
whois.lookup(args.domain, function(err, data) {
return message.channel.send(data, {split: true, code: true });
});
}
}
module.exports = whoisCommand;