Resolved syntax issues.

This commit is contained in:
Ralph 2019-10-09 20:37:54 -04:00 committed by GitHub
parent 28e95245b0
commit 61ee16ce64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,7 @@ exports.stats = {
usage: '',
description: 'Displays list of current Market stats',
process: function(bot, msg) {
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false&price_change_percentage=24h%2C1h%2C7d', function(error, response)
{
needle.get('https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=lbry-credits&order=market_cap_desc&per_page=100&page=1&sparkline=false&price_change_percentage=24h%2C1h%2C7d', function(error, response) {
if (error || response.statusCode !== 200) {
msg.channel.send('coingecko API is not available');
} else {
@ -67,9 +66,7 @@ GBP: [£${price_gbp.toFixed(2)}](${statsurl})
**% Change**
1 Hour: [${percent_change_1h}](${statsurl}) ${hr_indicator}
1 Day: [${percent_change_24h}](${statsurl}) ${day_indicator}
`;
1 Day: [${percent_change_24h}](${statsurl}) ${day_indicator}`;
const embed = {
description: description,
color: 7976557,
@ -110,4 +107,6 @@ GBP: [£${price_gbp.toFixed(2)}](${statsurl})
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
}
};
})
}
}