Wrap ad in [ad=align=center] spoiler tag
Build and Push (dev) / build (push) Successful in 39s

This commit is contained in:
2026-09-03 16:34:04 +00:00
parent 4d1f1eabf0
commit b283e700b9
+4 -2
View File
@@ -291,11 +291,13 @@ class TelegramStarsBot:
await self.lolz_api.create_comment(post_id, reply_message)
await asyncio.sleep(self.config.api_delay)
# Send ad as a separate comment if enabled
# Send ad as a separate comment wrapped in spoiler if enabled
if self.config.enable_ads:
ad_content = self.config._load_ads()
if ad_content:
await self.lolz_api.create_comment(post_id, ad_content)
# Wrap ad in spoiler with align=center
ad_wrapped = f"[ad=align=center]{ad_content}[/ad]"
await self.lolz_api.create_comment(post_id, ad_wrapped)
logger.info(f"Отправлена реклама к посту {post_id}")
await asyncio.sleep(self.config.api_delay)