Private API
约 164 字小于 1 分钟
2025-09-26
概览
私聊文件上传与输入状态等接口(消息发送请见 Message API)。
文件
upload_private_file
- 功能: 上传私聊文件。
- 参数:
user_id: str | int
,file: str
,name: str
- 返回:
None
- 示例:
await api.upload_private_file(123, "./a.zip", "a.zip")
get_private_file_url
- 功能: 获取已上传文件 URL。
- 参数:
file_id: str
- 返回:
str
URL
url = await api.get_private_file_url("file_id")
post_private_file
- 功能: 便捷上传(四选一)。
- 参数:
user_id
,image: str | None
,record: str | None
,video: str | None
,file: str | None
- 返回:
str
(message_id)
await api.post_private_file(123, image="C:/a.jpg")
其它
set_input_status
- 功能: 设置输入状态。
- 参数:
status: int
(0="对方正在说话",1="对方正在输入") - 返回:
None
- 示例:
await api.set_input_status(1)
版权所有
版权归属:huan-yp