Metadata-Version: 2.4
Name: osonbot
Version: 1.0.3
Summary: A simple and lightweight Telegram bot framework
Home-page: https://github.com/sinofarmonov323/osonbot
Author: https://t.me/jackson_rodger
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires: httpx
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# osonbot

A simple Telegram bot framework.

# Installation
```shell
pip install osonbot
```

Example echo bot
```python
from osonbot import Bot

bot = Bot("YOUR_BOT_TOKEN")

bot.when("/start", "Hello {first_name}!")
bot.when("*", "{message_text}") # * handles eveymessage if it is a text

bot.run()
```

Sending Media
```python
from osonbot import Bot, Photo, Video, Audio, Voice, Sticker

bot = Bot("YOUR_BOT_TOKEN")

bot.when("/photo", Photo("https://example.com/cat.jpg", caption="A cute cat 🐱")) 
bot.when("/video", Video("https://example.com/cat.mp4", caption="Funny cat video"))
bot.when("/audio", Audio("https://example.com/sound.mp3", caption="Cat sound"))
bot.when("/voice", Voice("voice.ogg", caption="Voice message"))
bot.when("/sticker", Sticker("CAACAgIAAxkBA..."))

bot.run()

```

Sending keyboard button
```python
from osonbot import Bot, KeyboardButton

keyboard = KeyboardButton(
    ["Button 1", "Button 2"],
    ["Button 3"],
)

bot = Bot("YOUR_BOT_TOKEN")
bot.when("/start", "Choose an option:", reply_markup=keyboard)
bot.run()
```

Sending inline keyboard button
```python
from osonbot import InlineKeyboardButton

keyboard = InlineKeyboardButton(
    [["GitHub", "github"], ["Website", "site"]]
)
```

Sending URL buttons
```python
from osonbot import URLKeyboardButton

keyboard = URLKeyboardButton(
    [["Open GitHub", "https://github.com/sinofarmonov323"]]
)
```

🧱 Full Features
Feature	Description
✅ Text message handling	when() and c_when() for callbacks
🧩 Inline / Reply keyboards	With helper functions
🖼️ Media sending	Photo, video, audio, voice, sticker
💾 SQLite integration	Auto-create tables
🔍 Logging	Built-in logger setup
⚡ Simple formatting	Use {first_name}, {message_text}, {user_id} placeholders
