Skip to main content

A python module to auto build conversation for a Telegram bot

Project description

PyPI - Python Version PyPI Code style: black GitHub

Alt text Welcome to Autoconv!
A Python package that help you build complex Telegram bot conversations with buttons, actions and much more.
This package is built over the awesome Python-Telegram-Bot!


You can find the package on PyPi (pip).

pip3 install telegram-autoconv



I know you want examples, in fact there is a beautiful folder with some examples.
In the table below, you can find an example for every functions in the module.
In addition to that, there is a live Telegram bot to showcase every features, @AutoBot. Function | Example | Documentation | :------------- | :---------- | :---------- add_keybord | | State add_text | | State add_dynamic_text | | State add_action | | State add_dynamic_keybord | | State add_custom_keyboard | | State add_dynamic_routes | | State add_dynamic_list | | State add_custom_handler| | State set_long_task| | State add_refresh_auth| | State add_operation_buttons | | State Conversation | | Conversation add_routes | | Conversation set_defaults | | Conversation add_authorized_users | | Conversation state_messages | | Texts Guide set_timed_function | | AutoConvHandler stop_timed_function | | AutoConvHandler send_autodestroy_message | | AutoConvHandler restart | | AutoConvHandler force_state | | AutoConvHandler save | | TelegamData add | | TelegamData get_or_set | | TelegamData


If you want to use persistence in your bot, Autoconv provides a simple persistence based on PicklePersistence.
The normal PicklePersistence doesn't work, due to an instance of a Telegram.Message in the user_data, this persistence uses a workaround.

from autoconv.utils.persistence import AutoconvPersistence
persistence = AutoconvPersistence(filename="bot_persistence", bot_token=BOT_TOKEN)
updater = Updater(BOT_TOKEN, persistence=persistence)

WARNING! This persistence will save the bot token in a pickle file.


Do you want to read? I got you cover, baby!
No more than a little documentation in the Wiki.

Real World Example

I have a simple movies info Telegram bot publicy available.
You can interact with the Bot (the response time it kinda high, caused by very slow connection) PopCorn (sorry for the italian).
The code (except for the config files) is in this GIST.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for telegram-autoconv, version 0.0.71
Filename, size File type Python version Upload date Hashes
Filename, size telegram-autoconv-0.0.71.tar.gz (16.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page