Examples
All examples live in the examples/ directory. Run any of them with your AUTHCODE:
echobot.py
A classic echo bot. Commands, media replies, catch-all echo.
/start— welcome message/help— command list/info— your name, ID, status/ping— bot repliespong!/stop— shuts the bot down- Sends photos, videos, audio back with captions
- Echoes any text message
media_bot.py
Send different types of media on command.
/photo— send a photo from URL/video— send a video file/file— send a PDF document/voice— send a voice message
filter_demo_bot.py
Every filter type in action — shows how to combine filters and what matches.
commands=["start"]—/starttext="hello"— exact matchtext=["hi", "hey"]— any of the listedcontent_types=["photo"]— photo messagescontent_types=["video"]— video messagescontent_types=["audio"]— voice messagescontent_types=["document"]— file messagesfilters="user"— catch-all fallback
html_demo_bot.py
All supported HTML tags in one bot.
<b>bold</b> <i>italic</i> <u>underline</u> <s>strikethrough</s>
<code>monospace</code> <pre>preformatted</pre> <h1>Heading</h1>
<a href="https://example.com">link</a>
chat_admin_bot.py
Chat management commands. You'll need admin rights in the chat for these to work.
/pin <message_id>— pin a message/edit <id> <new text>— edit a message/clear— clear history for everyone/clear_me— clear history for yourself/title <new name>— rename the chat/info— chat info (name, members, message count)