summaryrefslogtreecommitdiff
path: root/src/commands/minecraft/minecraftserverstatus.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/minecraft/minecraftserverstatus.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/minecraft/minecraftserverstatus.ts')
-rw-r--r--src/commands/minecraft/minecraftserverstatus.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commands/minecraft/minecraftserverstatus.ts b/src/commands/minecraft/minecraftserverstatus.ts
index 156a04f..706b43f 100644
--- a/src/commands/minecraft/minecraftserverstatus.ts
+++ b/src/commands/minecraft/minecraftserverstatus.ts
@@ -1,10 +1,11 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
import axios from 'axios'
+//@ts-ignore no types
import emoji from 'emoji-random'
module.exports = class MinecraftServerMinecraft extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'minecraftserverstatus',
aliases: [
@@ -42,12 +43,13 @@ module.exports = class MinecraftServerMinecraft extends Command {
]
});
}
- async run(msg: CommandoMessage, { ip, port }) {
+ async run(msg: CommandoMessage, { ip, port }: any) {
const res = (
await axios(`https://mcapi.us/server/status?ip=${ip}&port=${port}`).catch(err => {
console.error(err)
return msg.reply('Woops, an error has occured. ' + emoji.random())
})
+ //@ts-ignore yes this exists...
).data
if (res.status !== 'success') {