更新:

This commit is contained in:
Your Name
2026-07-17 10:21:18 +08:00
parent 530e7f839d
commit 2f2150d2f6
6 changed files with 596 additions and 30 deletions
@@ -818,7 +818,22 @@ class DouyinImHttpClient:
"""通过 IM API 发送 Protobuf 编码的私信(带接口签名)
content 可为纯文本,或 JSON 格式的结构化回复(文本/网址/卡片)。
所有出站发送(自动回复/手动 API/脚本)都经过全局限流器,
防止大量托管账号同时发送占满出站带宽或触发平台级风控。
"""
from .rate_limit import get_send_limiter
async with get_send_limiter():
return await self._send_text_message_unthrottled(
conversation_id, content, conversation_short_id
)
async def _send_text_message_unthrottled(
self,
conversation_id: str,
content: str,
conversation_short_id: str = "",
) -> bool:
from .auth import DouyinAuth
from .proto_builder import ProtoBuilder
from .reply_payload import (