summaryrefslogtreecommitdiff
path: root/src/commands/utility/whois.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-06-27 22:52:54 -0700
committer8cy <[email protected]>2020-06-27 22:52:54 -0700
commit80951013e391aab140800e4f386867e6c391553f (patch)
tree3d7101237ef1cd8d6fe2a2fab751a2dc55ae7d84 /src/commands/utility/whois.ts
parentmore config shit (diff)
downloaddep-core-80951013e391aab140800e4f386867e6c391553f.tar.xz
dep-core-80951013e391aab140800e4f386867e6c391553f.zip
add ts defs so not a lot of errors left
- made .todo file for epic error tracking
Diffstat (limited to 'src/commands/utility/whois.ts')
-rw-r--r--src/commands/utility/whois.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/commands/utility/whois.ts b/src/commands/utility/whois.ts
index 95c954c..d699e39 100644
--- a/src/commands/utility/whois.ts
+++ b/src/commands/utility/whois.ts
@@ -1,9 +1,11 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore no types
import emoji from 'emoji-random';
+//@ts-ignore no types
import whois from 'whois';
module.exports = class WhoIsUtility extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'whois',
group: 'utility',
@@ -25,12 +27,13 @@ module.exports = class WhoIsUtility extends Command {
]
});
}
- async run(msg: CommandoMessage, { host }) {
- whois.lookup(host, (err, data) => {
+ run(msg: CommandoMessage, { host }: any) {
+ //@ts-ignore doesnt matter if none is returned
+ return whois.lookup(host, (err: any, data: any) => {
if (err) return msg.reply(`Woops, there was an error getting that information for you! Please re-check your specified host/ domain. ${emoji.random()}`);
msg.reply(`Check your DMs for the whois! ${emoji.random()}`);
- msg.author.send(data, { split: true });
+ return msg.author.send(data, { split: true });
});
}
}; \ No newline at end of file