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/crypto/btc.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/commands/crypto/btc.ts') diff --git a/src/commands/crypto/btc.ts b/src/commands/crypto/btc.ts index 596b9e4..88cbf5a 100644 --- a/src/commands/crypto/btc.ts +++ b/src/commands/crypto/btc.ts @@ -1,10 +1,11 @@ -import { Command, CommandoMessage } from 'discord.js-commando'; +import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; +//@ts-ignore import emoji from 'emoji-random'; import btc from 'btc-value'; btc.setApiKey('a43419ce-fc59-4951-8af9-20c5e36ef73f'); module.exports = class BTCCrypto extends Command { - constructor(client) { + constructor(client: CommandoClient) { super(client, { name: 'btc', aliases: ['bitcoin', 'crypto'], @@ -32,10 +33,10 @@ module.exports = class BTCCrypto extends Command { clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] }); } - run(msg: CommandoMessage, { currencyName }) { + run(msg: CommandoMessage, { currencyName }: any) { currencyName = currencyName.toUpperCase(); - btc({ isDecimal: true, currencyCode: currencyName }).then(value => { - msg.reply(`The current price of *Bitcoin* is **${value} ${currencyName}**. ${emoji.random()}`); + return btc({ isDecimal: true, currencyCode: currencyName }).then(value => { + return msg.reply(`The current price of *Bitcoin* is **${value} ${currencyName}**. ${emoji.random()}`); }); } }; \ No newline at end of file -- cgit v1.2.3