From 54234e59ec23fd261dbd3f7b1e7641c91ba1f64b Mon Sep 17 00:00:00 2001 From: KatykhinAA Date: Sat, 20 Jul 2024 14:18:58 +0300 Subject: [PATCH] some fix --- .../handlers/callback/callback_handlers.py | 2 ++ .../handlers/private/private_handlers.py | 1 + .../__pycache__/main.cpython-312.pyc | Bin 6480 -> 6478 bytes helper_bot/keyboards/main.py | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helper_bot/handlers/callback/callback_handlers.py b/helper_bot/handlers/callback/callback_handlers.py index 66003a2..417daa7 100644 --- a/helper_bot/handlers/callback/callback_handlers.py +++ b/helper_bot/handlers/callback/callback_handlers.py @@ -77,6 +77,8 @@ async def post_for_group(call: CallbackQuery, state: FSMContext): # Выкладываем пост в канал await send_media_group_to_channel(bot=call.bot, chat_id=MAIN_PUBLIC, post_content=post_content, post_text=post_text) + # TODO: Удалить фотки с локалки + # TODO: Поменять чтобы записывалось не в FSM await call.bot.delete_messages(chat_id=GROUP_FOR_POST, message_ids=message_ids) await call.answer(text='Выложено!', show_alert=True, cache_time=3) diff --git a/helper_bot/handlers/private/private_handlers.py b/helper_bot/handlers/private/private_handlers.py index b3e51fa..1dffc69 100644 --- a/helper_bot/handlers/private/private_handlers.py +++ b/helper_bot/handlers/private/private_handlers.py @@ -197,6 +197,7 @@ async def suggest_router(message: types.Message, state: FSMContext, album: list elif message.media_group_id is not None: post_caption = " " + #TODO: Поставить запрет на обработку любых типов кроме photo. Запретить работать с forward message # Получаем сообщение и проверяем есть ли подпись. Если подпись есть, то преобразуем ее через функцию if album[0].caption: diff --git a/helper_bot/keyboards/__pycache__/main.cpython-312.pyc b/helper_bot/keyboards/__pycache__/main.cpython-312.pyc index 7c259e9328c3f4ea90d6fe5b137dc0b862a6895d..5c642c6728e28ec1ffeb5ae787bf378434c019e6 100644 GIT binary patch delta 142 zcmca$bk2zPG%qg~0}!ay&rS~H{!C4?i!4|E0jMl0I40$VCqE5h2V$_kuewI5-&t1UJOpU i=$8zZxR77;8Kmx07$YmA&?f4&5Se%} kIO(EaGFak5e$i);x=#^|tc*gR1lSpcK8pZZMdCoy0V=;M9{>OV diff --git a/helper_bot/keyboards/main.py b/helper_bot/keyboards/main.py index 9318b99..1bf7ed6 100644 --- a/helper_bot/keyboards/main.py +++ b/helper_bot/keyboards/main.py @@ -60,7 +60,6 @@ def create_keyboard_with_pagination(page: int, total_items: int, array_items: li # Создаем билдер для клавиатуры keyboard = InlineKeyboardBuilder() - # TODO: Тут поправить на 9 объектов, а не 7. Клавиатуру переделал # Вычисляем стартовый номер для текущей страницы start_index = (page - 1) * 9