I want ot deploy a bot in telegram, but i need a proactive feature. So, is it possible, If person triggers the bot and not sending any messages for a minute (for example), can the bot send the message itself after this period of time(a minute)?
a
aloof-angle-65701
05/18/2024, 5:08 PM
yes I think is possible but probably you have to use code.
Not sure how it works for Telegram, I have never worked with their API so maybe my response is not 100% accurate
You can save the latest user message date and time into a database creating a "before outgoing message" hook in botpress and then execute a cron every X min to check if you have to send any messages or not.
Probably you can send messages using telegram API. Not sure if botpress have this possibility once you have added the plugin.
maybe you can use https://botpress.com/docs/cloud/toolbox/table-cards/ to do part of the logic