I’m working on a project where my Raspberry Pi needs to connect with a Telegram Bot. My goal is to have the Pi capture a photo whenever a particular button is pressed and then automatically deliver that image into the chat. Any guidance or sample code would be extremely helpful in setting this up.
I’ve been working on a project where my Raspberry Pi was connected with a Telegram Bot, and I encountered many of the same challenges mentioned. In my experience, leveraging python-telegram-bot and the picamera module together simplified most of the work. I started with a basic script to capture an image when triggered, and then built the bot functionality to automatically send photos. Debugging became easier when I tested each component separately before integrating them. It also helped to thoroughly read through the API documentation to correctly handle file uploads and network issues.