Building Your First Telegram Bot | Telegram Bots That Get Work DONE PT 1

Опубликовано: 18 Июнь 2026
на канале: Don't Use This Code • James Powell
787
9

Sign up for DUTC Weekly: https://mailchi.mp/dutc/ytweekly

LinkedIn:   / do-n-t-use-this-code  
Website: https://www.dontusethiscode.com/index...
Upcoming events: learning.dutc.io
Looking for training? Contact [email protected]

This is part of the Python Bots: Transform & Roll out - Telegram series.

Let's write a bot for Telegram using Python and ChatGPT!

Summary
I'll write a bot that can help us automate the management of a Telegram channel, inviting users, changing permissions, updating channel settings and, most importantly, interacting with user messages.

And, as a bonus, I'll see if I can throw some ChatGPT & GPT4 in at the end!

Abstract
In this session, I'll guide you through writing your very first bot for the Telegram instant messaging service. The Telegram API is relatively complex, offering a (limited) HTTP- and REST-based API for bots as well as a very powerful custom-protocol-based API for general users. I'll look at both of these APIs, and find the most expedient way to develop a simple starting point that you can extend to implement your own features!

Though not typically used in corporate settings, Telegram has high-quality clients across multiple platforms, and much of the automation thinking I'll discuss in this session will be applicable to other business automation tasks.

Goals
My goals for you in this session are to write a bot that...

can change channel or group settings
can invite or remove users from a channel or group
can see messages from users
can respond to these users as part of an ongoing conversation
can supplement these responses using an LLM API like ChatGPT or GPT4