Changed markdown to html

This commit is contained in:
Joan
2025-09-17 17:57:44 +02:00
parent 16776f8766
commit b02e327aaf
4 changed files with 66 additions and 75 deletions

View File

@@ -92,11 +92,11 @@ async def check_expired_reservations(context: ContextTypes.DEFAULT_TYPE):
cancelled_count += 1
# Try to notify the user using context.bot
notification_text = (
f"Las participaciones `{numbers}` que tenías reservadas para el sorteo **{raffle_name}** han sido liberadas.\n\n"
f"Las participaciones <code>{numbers}</code> que tenías reservadas para el sorteo <b>{raffle_name}</b> han sido liberadas.\n\n"
f"Puedes volver a reservarlas, ¡pero tienes {RESERVATION_TIMEOUT_MINUTES} minutos para completar el pago!."
)
try:
await context.bot.send_message(chat_id=user_id, text=notification_text, parse_mode=ParseMode.MARKDOWN)
await context.bot.send_message(chat_id=user_id, text=notification_text, parse_mode=ParseMode.HTML)
logger.info(f"Notified user {user_id} (Name: {reservation['user_name']}) about expired reservation.")
except Forbidden:
logger.warning(f"Cannot notify user {user_id} (Forbidden). Reservation cancelled anyway.")