From 80951013e391aab140800e4f386867e6c391553f Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Sat, 27 Jun 2020 22:52:54 -0700 Subject: add ts defs so not a lot of errors left - made .todo file for epic error tracking --- src/commands/minecraft/minecraftserverstatus.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/commands/minecraft/minecraftserverstatus.ts') 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') { -- cgit v1.2.3