diff options
| author | 8cy <[email protected]> | 2020-06-27 22:52:54 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-06-27 22:52:54 -0700 |
| commit | 80951013e391aab140800e4f386867e6c391553f (patch) | |
| tree | 3d7101237ef1cd8d6fe2a2fab751a2dc55ae7d84 /src/commands/crypto/btc.ts | |
| parent | more config shit (diff) | |
| download | dep-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/crypto/btc.ts')
| -rw-r--r-- | src/commands/crypto/btc.ts | 11 |
1 files changed, 6 insertions, 5 deletions
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 |