Compare commits

...

2 commits

Author SHA1 Message Date
monty
0bf9fb3c65 help me 2019-12-22 21:20:54 +01:00
monty
fa4b8a3b86 fuck windows and not having a dig command 2019-12-22 10:03:14 +01:00
5 changed files with 49 additions and 4 deletions

View file

@ -90,7 +90,7 @@ module.exports = {
setTimeout(() => timestamps.delete(msg.author.id), cooldownAmount);
cmd.command(ctx).then(() => {}).catch((err) => {
if (!cmd.name.includes('e926' || 'e621')) {
if (!cmd.name.includes('e926') || !cmd.name.includes('e621')) {
trello
.addCard(
cmd.name + ' | ' + err.message,

View 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);
});
}
}
};

13
package-lock.json generated
View file

@ -2012,6 +2012,11 @@
"package-json": "^4.0.0"
}
},
"lodash.compact": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/lodash.compact/-/lodash.compact-3.0.1.tgz",
"integrity": "sha1-VAzjg3dFl1gHRx4WtKK6IeclbKU="
},
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
@ -2252,6 +2257,14 @@
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz",
"integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q=="
},
"node-dig-dns": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/node-dig-dns/-/node-dig-dns-0.2.10.tgz",
"integrity": "sha512-LKkPyrtNwf1oU9YYh68La4r+pN10exwcJhgNiLiJKZ7X6v9B5lMimXpqP9RE9jD+Hg/9cnvTYGtUCmt03lbpSA==",
"requires": {
"lodash.compact": "^3.0.1"
}
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",

View file

@ -19,6 +19,7 @@
"helmet": "*",
"moment": "*",
"morgan": "^1.9.1",
"node-dig-dns": "^0.2.10",
"nodemon": "^1.19.4",
"ora": "^4.0.2",
"phin": "*",

4
run.sh
View file

@ -1,9 +1,7 @@
#!/bin/bash
FILE=index
NODE=node
while true;
do
$NODE $(pwd)/$FILE.js
done
done