Answer the question
In order to leave comments, you need to log in
Bot on node js?
I have
bot.onText(/\/echo (.+)/, function(msg, match) {
const chatId = msg.chat.id;
const resp = match[1];
const curTime = new Date();
bot.sendMessage(chatId,
`Дата: ${curTime}
Транспорт: ${resp}
`);
Answer the question
In order to leave comments, you need to log in
What is it like?
You start communication with the bot with the /start command -
This is the -> regular expression.
What message do you need to execute your function on? ot.onText(/\/start/, function(msg, match) {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question