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.

Do you want to help me?

If you want to contribute you are welcome! I don't have guidelines for now, but contact me on Telegram @Mortafix.
If you want to donate, thank you so much for your support!
Buy Me A Coffee

Project details

Download files

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

Source Distribution

telegram-autoconv-0.0.72.tar.gz (16.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page