Open xMA3x opened 3 years ago
hello,
for the
first question I believe it is in the GitHub readme below the files, just scroll downwards and spends times reading the documents that the author wrote, you will see something like this
same goes to your second question, what you should looking for is something like "msg.chatId"
feel free to ask for further clarify .
or msg.from.id,
hello,
for the
- first question I believe it is in the GitHub readme below the files, just scroll downwards and spends times reading the documents that the author wrote, you will see something like this
- same goes to your second question, what you should looking for is something like "msg.chatId"
feel free to ask for further clarify .
I haad already found a way in KittyBot.js example that shows how to log every msg
// Log every text message
bot.on('text', function (msg) {
console.log(`[text] ${ msg.chat.id } ${ msg.text }`);
});
but the idea is: how I can SAVE the log, even after deploy it to Heroku is there is a way to save it to a spreadsheet ? or i will have to add a test file to save the log ? or Heroku will show it in the log acticity?
and for the secand on, even after saving the chatid, how I will be able to send them a msg?
to save log into database you need to create a function that do so, look up for something like "save info in rest API" something like that
I want to 1- log (date, user name,chatid, first name, last name) for every message that a user sends and if it possible it be in a spreadsheet
2- store every chatid that used the bot, so i can send a message to evrey user and if there is another way, i will appreciate it