From 2d2aadd4c1e16180f29894faf252c44740478249 Mon Sep 17 00:00:00 2001 From: Davte Date: Thu, 20 Feb 2020 10:22:24 +0100 Subject: [PATCH] Use chat_action instead of placeholder text --- ciclopibot/__init__.py | 2 +- ciclopibot/ciclopi.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ciclopibot/__init__.py b/ciclopibot/__init__.py index 749cf18..e6a25fd 100644 --- a/ciclopibot/__init__.py +++ b/ciclopibot/__init__.py @@ -3,7 +3,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __license__ = "GNU General Public License v3.0" -__version__ = "1.1.8" +__version__ = "1.1.9" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/ciclopibot/ciclopi.py b/ciclopibot/ciclopi.py index f46f921..67e2537 100644 --- a/ciclopibot/ciclopi.py +++ b/ciclopibot/ciclopi.py @@ -9,6 +9,7 @@ import datetime import math # Third party modules +import davtelepot from davtelepot.utilities import ( async_wrapper, CachedPage, extract, get_cleaned_text, line_drawing_unordered_list, make_button, make_inline_keyboard, @@ -567,21 +568,21 @@ async def cancel_ciclopi_location(bot, update, user_record): ) -async def _ciclopi_command(bot, update, user_record, sent_message=None, +async def _ciclopi_command(bot: davtelepot.bot.Bot, update, user_record, sent_message=None, show_all=False): chat_id = update['chat']['id'] default_stations_to_show = 5 stations = [] placeholder_id = bot.set_placeholder( timeout=datetime.timedelta(seconds=1), - sent_message=sent_message, chat_id=chat_id, - text="{message}...".format( - message=bot.get_message( - 'ciclopi', 'command', 'updating', - update=update, user_record=user_record - ) - ) + # sent_message=sent_message, + # text="{message}...".format( + # message=bot.get_message( + # 'ciclopi', 'command', 'updating', + # update=update, user_record=user_record + # ) + # ) ) ciclopi_data = await ciclopi_webpage.get_page() if ciclopi_data is None or isinstance(ciclopi_data, Exception):