Creating Telegram bot with AI assistance as complete beginner - hitting roadblocks and need guidance

Hey folks, I’m trying to create a Telegram bot using AI tools like ChatGPT but I’m a complete newbie to programming. This is just a personal project to help me automate some repetitive tasks I do manually.

What I want to achieve:
A bot that copies messages from one place to another with these features:

  • Copy all types of content (text, images, videos, audio files, etc.)
  • Source: specific discussion thread in a large group chat
  • Destination: regular group chat
  • Keep messages in correct chronological order
  • Send content as new messages instead of forwarding
  • Process messages in small groups (10 at a time with 10 second pauses)
  • Save progress to a file so I can restart if something goes wrong

My problem:
The AI keeps breaking things when I try to add features. I start with basic text copying, then try to add image support, then batching. But when I add the third feature, the first two stop working properly. It’s like going in circles where I fix the same problems over and over.

When I ask for everything at once, I get messy code that doesn’t run at all.

Looking for:

  1. A solid foundation script that includes all these features
  2. Better ways to work with AI coding assistants

I’m really stuck here and any help would be amazing. Thanks everyone!

I ran into similar issues when building my first Telegram bot last year. The main problem is that AI assistants don’t maintain context well between iterations, so they often rewrite working code sections incorrectly. What helped me was creating a version control system, even just copying working code to separate files before adding new features. When the AI breaks something, you can quickly revert to the last working version. For your specific use case, I’d suggest starting with the pytelegrambot library and focus on getting message copying from thread to group working first. The chronological ordering and batching are actually the trickiest parts - messages can arrive out of sequence and rate limiting is crucial to avoid getting banned. Also, be very specific with your AI prompts. Instead of saying “add image support”, say exactly “modify the handle_message function to also copy photo messages while keeping existing text message functionality intact.”

The issue you’re describing is super common when working with AI coding tools. I had the exact same problem building automation scripts last year. What worked for me was writing down the exact requirements in a detailed prompt and keeping it saved in a text file. Every time you ask the AI to modify code, paste that full requirement list again so it doesn’t forget what the code is supposed to do originally. Another thing that helped was asking the AI to explain what each function does before making changes. This way you can spot when it’s about to mess up something that was already working. For Telegram bots specifically, the telebot library is pretty forgiving for beginners and has good error handling built in. Make sure you’re testing each feature separately in a small test group before combining everything together. The progress saving feature you want is actually pretty straightforward once you get the basic copying working, so don’t try to implement everything simultaneously.

yea, it’s easy to get stuck like that. try breaking down your project into smaller chunks and just let the ai help add one thing at a time. also, checking out the telegram api docs might really help you understand what’s possible with messages.