help me
This commit is contained in:
parent
fa4b8a3b86
commit
0bf9fb3c65
1 changed files with 33 additions and 0 deletions
33
DiscordModules/General/dig.js
Normal file
33
DiscordModules/General/dig.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
const Command = require('../../src/structures/Command');
|
||||
const exec = require('shell-exec');
|
||||
const dig = require('node-dig-dns');
|
||||
let DomainReg = new RegExp(`(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]`);
|
||||
module.exports = class Dig extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: 'dig',
|
||||
description: 'dig website dns information stuff',
|
||||
aliases: [],
|
||||
module: 'General',
|
||||
cooldown: 10,
|
||||
guildOnly: false,
|
||||
developerOnly: false,
|
||||
nsfw: false
|
||||
});
|
||||
}
|
||||
|
||||
async command(ctx) {
|
||||
console.log(ctx.args);
|
||||
console.log(ctx.args[0].match(DomainReg));
|
||||
|
||||
if (ctx.args[0].match(DomainReg)) {
|
||||
dig([ 'shyzu.link', 'ns' ])
|
||||
.then((result) => {
|
||||
console.log(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('Error:', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue