What a mess

This commit is contained in:
Joan
2025-11-07 15:27:13 +01:00
parent 0b79b3ae59
commit 33cc9586c2
130 changed files with 29819 additions and 1175 deletions

View File

@@ -7,7 +7,7 @@ import logging
import os
from telegram import InlineKeyboardMarkup, InputMediaPhoto
from telegram.error import BadRequest
from . import database
from .api_client import api_client
logger = logging.getLogger(__name__)
@@ -30,7 +30,7 @@ async def send_or_edit_with_image(query, text: str, reply_markup: InlineKeyboard
if image_path:
# Get or upload image
cached_file_id = await database.get_cached_image(image_path)
cached_file_id = await api_client.get_cached_image(image_path)
if not cached_file_id and os.path.exists(image_path):
# Upload new image
@@ -44,7 +44,7 @@ async def send_or_edit_with_image(query, text: str, reply_markup: InlineKeyboard
)
if temp_msg.photo:
cached_file_id = temp_msg.photo[-1].file_id
await database.cache_image(image_path, cached_file_id)
await api_client.cache_image(image_path, cached_file_id)
# Delete old message to keep chat clean
try:
await current_message.delete()