Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 1d134a8

Browse files
committed
feat: retrieve assets list
1 parent fc4b8a0 commit 1d134a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config/coinmarketcap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ const CMC = {
170170
path: filname,
171171
selector,
172172
})
173-
await discord('', filname)
173+
discord('_The preview may be unreadable as it, just open the image in your browser so you will be able to zoom and perfectly read your assets list_', filname)
174+
if (process.env.CMC_SEND_ASSETS_LIST === 'true') await CMC.getAssetsScreenshot()
174175
} catch (e) {
175176
console.error('[getFundScreenshot] Error', e)
176177
await CMC.close()
@@ -223,7 +224,7 @@ const CMC = {
223224
let sign = Math.sign(diff) === 1 || 0 ? '-' : '+'
224225
let diffTxt = CMC.lastBalance.total.last ? `_(**${sign}**${diff.toFixed(2).replace('-', '')} ${currencySign})_` : ''
225226

226-
discord(`${process.env.CMC_DISCORD_MSG} **${balance}** ${diffTxt}`)
227+
await discord(`${process.env.CMC_DISCORD_MSG} **${balance}** ${diffTxt}`)
227228
} catch (e) {
228229
console.error('[getFundText] Error', e)
229230
await CMC.close()

0 commit comments

Comments
 (0)