dig command for myself uwu
This commit is contained in:
parent
0bf9fb3c65
commit
635cfb0391
|
@ -1,33 +0,0 @@
|
||||||
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 New Issue