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/animals/dog.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/commands/animals/dog.ts') diff --git a/src/commands/animals/dog.ts b/src/commands/animals/dog.ts index 118c951..0498dbf 100644 --- a/src/commands/animals/dog.ts +++ b/src/commands/animals/dog.ts @@ -1,10 +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' import { MessageEmbed } from 'discord.js'; import axios from 'axios'; module.exports = class DogAnimals extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'dog', aliases: [ @@ -29,10 +30,10 @@ module.exports = class DogAnimals extends Command { .setAuthor('dog.ceo', 'https://dog.ceo/img/favicon.png', 'https://dog.ceo/dog-api/') .setColor(0xFFCC4D) .setImage(await (await axios.get('https://dog.ceo/api/breeds/image/random')).data.message) - msg.say(emb) + return msg.say(emb) } catch (err) { console.log(err) - msg.reply('Woops, there was an error with the (http://dog.ceo/dog-api) API. ' + emoji.random()) + return msg.reply('Woops, there was an error with the (http://dog.ceo/dog-api) API. ' + emoji.random()) } } }; \ No newline at end of file -- cgit v1.2.3