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