This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user