forked from Supositware/Haha-Yes
Show's website whois
This commit is contained in:
parent
84ef4456de
commit
fb780ccee1
1 changed files with 31 additions and 0 deletions
31
commands/utility/whois.js
Normal file
31
commands/utility/whois.js
Normal 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;
|
Loading…
Reference in a new issue