4/27/2023 0 Comments Telegram bot interactive![]() ![]() You first need to create a Telegram bot, then you can refer to the sample code in tests\test_connection.py to run a complete use-case.Ī session can be started with the keyword /start from a Telegram client.įollowing code block creates a Hello, World! message: from telegram_menu import BaseMessage, TelegramMenuSession, NavigationHandler API_KEY = "put_your_telegram_bot_api_key_here" class StartMessage ( BaseMessage ): """Start menu, create all app sub-menus.""" LABEL = "start" def _init_ ( self, navigation : NavigationHandler ) -> None : """Init StartMessage class.""" super (). Here is an example of navigation with menus and inlined buttons: Previous versions use the oldest non-asynchronous version of python-telegram-bot and are not compatible. NOTE: asyncio support was added in version 2.0.0. ![]() Integration of HTML formatting emojis.Automatic deletion of messages when configurable timer has expired.Messages can read text input from the keyboard.Session manager with multiple users connecting to the same bot.Support for sending pictures (local file or url), stickers, notifications, webapps and polls.Menu navigation using tree structure, unlimited depth.A python library to generate navigation menus using Telegram Bot API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |