diff --git a/app.js b/app.js index ef1d761..1ac5194 100644 --- a/app.js +++ b/app.js @@ -18,8 +18,12 @@ const bot = new TeleBot(process.env.TELEBOT); telebotChatID=process.env.TELECHAT; bot.on('text', (msg) => { - msg.reply.text(msg.text); - console.log(msg); + if (msg.from.id==telebotChatID) { + msg.reply.text(msg.text); + } else { + msg.reply.text("Entschuldige, " + msg.from.username + "\nIch darf nicht mit fremden reden."); + log.Info("Telebot-nachricht: " + msg.from.username + " - " + msg.text); + } }); bot.start();