This repository was archived by the owner on Feb 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 268
How to add a message handler to the bot ? #194
Comments
or msg.from.id, |
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 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 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: