change hash to embed out put

This commit is contained in:
MSFTserver 2017-10-29 18:10:05 -07:00 committed by GitHub
parent 56c2039a3f
commit 6b31ed50d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,13 +23,17 @@ exports.timedhash = function(bot) {
height += data.status.height; height += data.status.height;
hashrate += data.status.hashrate; hashrate += data.status.hashrate;
difficulty += data.status.difficulty; difficulty += data.status.difficulty;
bot.channels.get(ChannelID).send( description = "Hashrate: "+hashrate+"\n"+"Difficulty: "+difficulty+"\n"+"Current block: "+height+"\n"+"Source: https://explorer.lbry.io";
// 'Blockchain stats:\n' + const embed = {
'Hashrate: ' + hashrate + '\n' + "description": description,
'Difficulty: ' + difficulty + '\n' + "color": 7976557,
'Current block: ' + height + '\n' + "author": {
'_Source: https://explorer.lbry.io_' "name": "LBRY Explorer Stats",
); "url": "https://explorer.lbry.io",
"icon_url": "https://i.imgur.com/yWf5USu.png"
}
};
bot.channels.get(ChannelID).send({ embed });
} }
}); });
} }
@ -59,14 +63,17 @@ function sendMiningInfo(bot, msg) {
height += data.status.height; height += data.status.height;
hashrate += data.status.hashrate; hashrate += data.status.hashrate;
difficulty += data.status.difficulty; difficulty += data.status.difficulty;
description = "Hashrate: "+hashrate+"\n"+"Difficulty: "+difficulty+"\n"+"Current block: "+height+"\n"+"Source: https://explorer.lbry.io";
msg.channel.send( const embed = {
// 'Blockchain stats:\n' + "description": description,
'Hashrate: ' + hashrate + '\n' + "color": 7976557,
'Difficulty: ' + difficulty + '\n' + "author": {
'Current block: ' + height + '\n' + "name": "LBRY Explorer Stats",
'_Source: https://explorer.lbry.io_' "url": "https://explorer.lbry.io",
); "icon_url": "https://i.imgur.com/yWf5USu.png"
}
};
msg.channel.send({ embed });
} }
}); });
} }