Commit c6244bf
src/messages/main.py
@@ -327,3 +327,4 @@ async def preview_social_media(
logger.exception(e)
finally:
await delete_message(warn_msg)
+ return sent_messages
src/messages/sender.py
@@ -7,6 +7,7 @@ from pathlib import Path
from loguru import logger
from pyrogram.client import Client
from pyrogram.errors import FloodWait
+from pyrogram.parser.markdown import BLOCKQUOTE_EXPANDABLE_DELIM
from pyrogram.types import Message, ReplyParameters
from config import CAPTION_LENGTH, TID
@@ -129,8 +130,11 @@ async def send_texts(
if not msg:
continue
# we do not send comments-only texts
- if all(s.startswith("**>") for s in msg.split("\n") if s):
+ if all(s.startswith(BLOCKQUOTE_EXPANDABLE_DELIM) for s in msg.split("\n") if s):
continue
+ if f"{BLOCKQUOTE_EXPANDABLE_DELIM}💬" in msg and "💬**点此展开评论区**:" not in msg:
+ continue
+
if idx != 0:
reply_parameters = ReplyParameters()
try: