Skip to content

Commit

Permalink
Markdown Support
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr committed Jun 8, 2018
1 parent 2d1ef1a commit 0fbae2f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,17 @@ bot.onText(/\/stats/, (msg, match) => {
const chatId = msg.chat.id;

if (admin_id == chatId) {
bot.sendMessage(chatId, "Checking interval: `" + interval + 's`\n'+
bot.sendMessage(chatId, "Checking interval: `" + interval + ' sec`\n'+
"Node failed connection attempt notification threshold: `" + retries+'`\n'+
"Missed block threshold: `"+threshold+'`\n'+
"Missed block reset time window: `"+timeWindow+"s`\n"+
"Missed block reset time window: `"+timeWindow+" sec`\n"+
"API node: `"+apiNode+'`\n'+
"Backup signing key: `"+backupKey+'`\n'+
"Recap time period: `"+auto_stats+' minutes`\n'+
"Recap time period: `"+auto_stats+' min`\n'+
"Total missed blocks: `"+total_missed+'`\n'+
"Missed blocks in current time window: `"+(total_missed - start_missed)+'`');
"Missed blocks in current time window: `"+(total_missed - start_missed)+'`',{
parse_mode: "Markdown"
});
} else {
bot.sendMessage(chatId, "You need to authenticate first.");
}
Expand Down Expand Up @@ -280,15 +282,17 @@ function checkWitness() {
if ((admin_id!=0) && (auto_stats>0)) {
if (Math.floor((Date.now()-lastupdate)/60000)>=auto_stats) {
lastupdate=Date.now();
bot.sendMessage(admin_id, "Checking interval: `" + interval + 's`\n'+
bot.sendMessage(admin_id, "Checking interval: `" + interval + ' sec`\n'+
"Node failed connection attempt notification threshold: `" + retries+'`\n'+
"Missed block threshold: `"+threshold+'`\n'+
"Missed block reset time window: `"+timeWindow+"s`\n"+
"Missed block reset time window: `"+timeWindow+" sec`\n"+
"API node: `"+apiNode+'`\n'+
"Backup signing key: `"+backupKey+'`\n'+
"Recap time period: `"+auto_stats+' minutes`\n'+
"Recap time period: `"+auto_stats+' min`\n'+
"Total missed blocks: `"+total_missed+'`\n'+
"Missed blocks in current time window: `"+(total_missed - start_missed)+'`');
"Missed blocks in current time window: `"+(total_missed - start_missed)+'`',{
parse_mode: "Markdown"
});
}
}
total_missed = witness[0].total_missed;
Expand Down

0 comments on commit 0fbae2f

Please sign in to comment.