mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-09-03 02:35:17 +00:00
change hash to embed out put
This commit is contained in:
parent
56c2039a3f
commit
6b31ed50d6
1 changed files with 22 additions and 15 deletions
|
@ -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 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue