
In this article, we’ll look at how to make a Telegram bot with Python. Building a chatbot on Telegram is fairly simple and requires a few steps that take very little time to complete.
Steps :
Step 1: Create a Telegram Account
Step 2: Find BotFather in the telegram
Step 3: Open it and Press the start

Step 4: Click on /newbot

Step 5: Now choose the name for the bot
Step 6: And then choose the username for the bot

After that, We need to install a library to edit the Telegram bot
Pip install python-telegram-bot
conda install -c conda-forge python-telegram-bot
Source Code
Step 1: Import the libraries.
from telegram import *
from telegram.ext import *
Step 2: Fetching the bot information
bot = Bot("Past token ID")
print(bot.get_me())
Step 3: Update the for future changes
updater=Updater("Past token ID ",use_context=True)
#use_context is use for if your telegram version is low than use false else use true
Step 4: A dispatcher is used to dispatch this update to our telegram bot
dispatcher=updater.dispatcherStep 5: We create the command for a specific reply that we want
# For Commands
def test_fnc2(update: Update, context: CallbackContext):
bot.send_message(
chat_id=update.effective_chat.id,
text="Welcome to the Copyassignment.com ",
)
start_value2=CommandHandler('start', test_fnc2)
dispatcher.add_handler (start_value2)
#adding more Command
def test_fnc(update: Update, context: CallbackContext):
bot.send_message(
chat_id=update.effective_chat.id,
text="tutorial link: https://copyassignment.com/python/ ",
)
start_value=CommandHandler('python', test_fnc)
dispatcher.add_handler (start_value)
Step 6: Polling the update
updater.start_polling()Output:

Also Read:
- You Can Now Run AI Fully Offline on Your Phone — Google’s Gemma 4 Just Changed Everything
- I Built a 24×7 AI Blogging System for WordPress Using Python (Free) — Full Code Inside
- This Reddit User “Hacked” AI With Simple Tricks… And The Results Are Insane
- One “rm -rf” Command Almost Wiped Out $100 Million Worth of Toy Story 2
- How to Make Money with ChatGPT in 2026: A Real Guide That Still Works
- PicoClaw vs OpenClaw: The Tiny AI That Could Replace Powerful AI Agents
- Oracle Layoffs 2026: People Woke Up to an Email… and Lost Their Jobs Instantly
- X’s New Video Update Is Breaking a Basic Feature — And Users Are Not Happy
- The Most Shocking Military Tech Yet: Robot Soldiers That Could Change Warfare Forever
- Sora Shutdown: The Reality Check That Shook AI Video — And What Comes Next
- Aya Expanse supports multiple languages for diverse global applications
- Alibaba releases Page Agent on GitHub for public access
- Google Sheets Gemini reaches new levels of performance and accuracy
- Artificial intelligence boosts cardiac care in rural Australian communities
- NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments



