Learn Coding
57 subscribers
21 links
Download Telegram
🚨 Video Reference

Watch this for a full visual walkthrough of setting up aiogram v3

➡️ aiogram 3 beginner series — full playlist
➡️ Official aiogram 3 docs

🔖 Watch: Aiogram Basics: Build Your First Telegram Bot (15:00) + Lesson 1 — First Handlers (23:39)
Please open Telegram to view this post
VIEW IN TELEGRAM
✏️ Lecture 14 Homework

Get the echo bot running then extend it:

➡️ Add a /about command that tells the user what your bot does
➡️ Add a /time command that sends the current time

from datetime import datetime

@dp.message(Command("time"))
async def time_handler(message: Message):
now = datetime.now().strftime("%H:%M:%S")
await message.answer(f"Current time: {now}")


➡️ Make the echo handler only respond to text messages:

from aiogram.filters import F

@dp.message(F.text)
async def echo_handler(message: Message):
await message.answer(message.text)


Test all commands, screenshot the responses from your actual bot

⚠️ Next lecture drops in 2 days — Commands & Handlers
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM