Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

162 Commits

Repository files navigation

PyPI - Python VersionPyPICode style: blackGitHub

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!

Setup

You can find the package on PyPi (pip).

pip3 install telegram-autoconv

Requirements

Examples

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.

FunctionExampleDocumentation
add_keybordkeyboards.pyState
add_textactions.pyState
add_dynamic_textactions.pyState
add_actionactions.pyState
add_dynamic_keybordkeyboards.pyState
add_custom_keyboardkeyboards.pyState
add_dynamic_routeskeyboards.pyState
add_dynamic_listdynamic_list.pyState
add_custom_handlerhandlers.pyState
set_long_taskactions.pyState
add_refresh_authauthorization.pyState
add_operation_buttonskeyboards.pyState
Conversationconversation.pyConversation
add_routesconversation.pyConversation
set_defaultsdefaults.pyConversation
add_authorized_usersauthorization.pyConversation
state_messagestexts.pyTexts Guide
set_timed_functionasync.pyAutoConvHandler
stop_timed_functionasync.pyAutoConvHandler
send_autodestroy_messageasync.pyAutoConvHandler
restartautoconv_handler.pyAutoConvHandler
force_stateautoconv_handler.pyAutoConvHandler
savetdata.pyTelegamData
addtdata.pyTelegamData
get_or_settdata.pyTelegamData

Persistence

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.

fromautoconv.utils.persistenceimportAutoconvPersistencepersistence=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.

Documentation

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

About

Python package to handle automatic conversation in a Telegram bot.

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages