Compare commits
2 commits
a965dd70e2
...
0bf9fb3c65
Author | SHA1 | Date | |
---|---|---|---|
|
0bf9fb3c65 | ||
|
fa4b8a3b86 |
5 changed files with 49 additions and 4 deletions
|
@ -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,
|
||||
|
|
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
13
package-lock.json
generated
13
package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -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": "*",
|
||||
|
|
2
run.sh
2
run.sh
|
@ -1,8 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILE=index
|
||||
NODE=node
|
||||
|
||||
while true;
|
||||
do
|
||||
$NODE $(pwd)/$FILE.js
|
||||
|
|
Loading…
Reference in a new issue