Repository navigation
Solved Issues
-
The
file_idattribute is variable. It's persistent (https://core.telegram.org/bots/faq#can-i-count-on-file-ids-to-be-persistent) but sometimes you can get a differentfile_idfor for a same file requested. That's the reason to store the ID for the audio entry in the DB as the combination offile_unique_idplusdate: https://github.com/gilpanal/beatbytebot/blob/41cbe9411a31ef95d3d83897a1a495c84097d85f/dbhandler/dbhandler.js#L101 -
As delete message update event is not available: https://core.telegram.org/bots/api#getting-updates. To remove a particular file using the bot, it's required to edit the original message by adding a caption which says "delete". See: · https://github.com/gilpanal/beatbytebot/blob/41cbe9411a31ef95d3d83897a1a495c84097d85f/bot.js#L63 · https://github.com/gilpanal/beatbytebot/blob/41cbe9411a31ef95d3d83897a1a495c84097d85f/bot.js#L82
-
For the demo environment hosted in Heroku it was required to create a "cronjob" in order to wake up the bot every 30 min to avoid going to idle mode. More info: https://medium.com/better-programming/keeping-my-heroku-app-alive-b19f3a8c3a82