Metadata-Version: 2.1
Name: telebot_wrapper
Version: 0.2.0
Summary: pyTelegramBotApi wrapper
Home-page: https://github.com/HamletSargsyan/pyTelegramBotApiWrapper
License: MIT
Keywords: telegram,bot,api,tools
Author: Hamlet
Author-email: hamlets849@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyTelegramBotApi (>=4.20.0,<5.0.0)
Project-URL: Repository, https://github.com/HamletSargsyan/pyTelegramBotApiWrapper
Description-Content-Type: text/markdown

# pyTelegramBotWrapper

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/telebot_wrapper)
![GitHub Release](https://img.shields.io/github/v/release/HamletSargsyan/pyTelegramBotAPIWrapper)
![PyPI - Version](https://img.shields.io/pypi/v/pyTelegramBotApiWrapper)
![GitHub License](https://img.shields.io/github/license/HamletSargsyan/pyTelegramBotApiWrapper)


## Install

```bash
pip install --upgrade telebot_wrapper
```

## Examples

### Callback query
```python
from telebot.types import CallbackQuery,  Message
from telebot.util import quick_markup

from telebot_wrapper.utils import compress_string, decompress_string

TOKEN = ""
bot = Bot(token=TOKEN)


@bot.callback_query_handler(lambda call: decompress_string(call.data) == "any")
def handle_callback_query(call: CallbackQuery, parsed_data: list[str]):
    print("ANY")
    bot.send_message(call.message.chat.id, f"Any | Parsed data: {parsed_data}")

@bot.callback_query_handler(lambda call: True)
def callback_query(call: CallbackQuery, parsed_data: list[str]):
    print("default")
    bot.send_message(call.message.chat.id, f"Parsed data: {parsed_data}")
    
    
        
@bot.message_handler(func=lambda message: True)
def message_handler(message: Message):
    markup = quick_markup({
        "btn": {"callback_data": compress_string("any")}
    })
    
    bot.reply_to(message, "txt", reply_markup=markup)

if __name__ == "__main__":
    bot.infinity_polling()
```

