Metadata-Version: 2.4
Name: vibecodedbot
Version: 0.1.0
Summary: A entirely vibecoded dependency-free Telegram bot library
Author: vibebot contributors
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-python
Dynamic: summary

# vibebot

A small dependency-free Python Telegram bot library with a route-based syntax.

## Quick start

```python
import os

from vibebot import VibeBot

bot = VibeBot(os.environ["TELEGRAM_BOT_TOKEN"])

bot.on_command("start").reply("Hello from vibebot.")
bot.on_text("ping", contains=True).reply("pong")
bot.on_media("photo").reply("Nice photo.")


@bot.on_message().act
def echo(event):
    return event.text


bot.open()
```

Run the included example:

```powershell
$env:TELEGRAM_BOT_TOKEN = "123456:your-token"
python examples_echo.py
```

## Syntax

- `bot.on_command("start").reply("Hello")` handles `/start`.
- `bot.on_text("ping", contains=True).reply("pong")` matches message text.
- `@bot.on_message().act` runs custom code for every message.
- Handler functions receive a `TelegramEvent`.
- Returning a string from a handler automatically sends it back.

## TelegramEvent helpers

- `event.text`
- `event.caption`
- `event.command`
- `event.chat_id`
- `event.media`
- `event.media_kind`
- `event.photo`
- `event.reply("text")`
- `event.reply_photo("photo-file-id-or-path.jpg", caption="Look")`
- `event.reply_document("report.pdf")`

The lower-level `Bot` class is still available for raw Telegram Bot API calls.

## Sending Media

```python
bot.send_photo(chat_id, "photo-file-id-or-path.jpg", caption="Photo")
bot.send_video(chat_id, "video.mp4", caption="Video")
bot.send_document(chat_id, "report.pdf")
bot.send_audio(chat_id, "song.mp3")
bot.send_voice(chat_id, "voice.ogg")
bot.send_animation(chat_id, "animation.gif")
bot.send_sticker(chat_id, "sticker-file-id")
```

Media values can be Telegram `file_id`s, public URLs, local paths, `Path` objects, or open binary file objects.
