1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/utility/whois.js

31 lines
641 B
JavaScript

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;