From 2b48cbade4244a51a2785e1a06183f8843ae1a14 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Tue, 23 Jun 2020 11:13:27 +0100 Subject: [PATCH] git more logging --- app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 61c5f85..a2f31d8 100644 --- a/app.js +++ b/app.js @@ -23,7 +23,7 @@ const bot = new TelegramBot(token, { // Wlecome Message bot.on('new_chat_members', (msg) => { const newUserMention = "@" + msg.new_chat_member.first_name + "<\/a>" - bot.sendMessage(msg.chat.id,"Hello " + newUserMention + ", Welcome to " + channel + ". \n\nPlease PM me @" + process.env.BOT_USERNAME + " to find out all needed information about our service before asking an admin or posting in here.\n\nIf you do ask questions, and its obvious you have not spoken to me, we might not take it well.", { parse_mode: "HTML" }); + bot.sendMessage(msg.chat.id,"Hello " + newUserMention + ", Welcome to " + channel + ". \n\nPlease PM me @" + process.env.BOT_USERNAME + " to find out all needed information about our service before asking an admin or posting in here.\n\nIf you do ask questions, and its obvious you have not spoken to me, you will be booted from the room. This is IPTV, admins don't have time for hand holding.!!!", { parse_mode: "HTML" }); logger.info("ID - " + msg.new_chat_member.id + " First Name - " + msg.new_chat_member.first_name + " joined the group"); }); @@ -76,7 +76,7 @@ bot.on('message', (msg) => { request(options, function (error, response, body) { if (error) throw new Error(error); - console.log(body); + // console.log(body); let jsonBody = JSON.parse(body) if (jsonBody.data.length > 0) { bot.sendMessage(msg.chat.id, 'Yes there is!').then(() => { @@ -84,8 +84,7 @@ bot.on('message', (msg) => { var homeTeam = entry.localTeam.data.name var awayTeam = entry.visitorTeam.data.name var startTime = entry.time.starting_at.time - - console.log(entry); + // console.log(entry); bot.sendMessage(msg.chat.id, homeTeam + " VS " + awayTeam + " @ " + startTime) }); })