Skip to main content

💬 WeChat API Reference

This page is currently only available in Chinese. Please switch to 简体中文 for the full content.

💬 WeChat API Reference

⚠️ Note: The WeChat API is not office.wechat.*, but PyOfficeRobot.* Install: pip install PyOfficeRobot Import: import PyOfficeRobot

Function Overview

FunctionDescription
chat.send_message(who, message)Send message
chat.send_message_by_time(who, message, time)Scheduled send
chat.chat_by_keywords(who, keywords)Keyword auto-reply
file.send_file(who, file)Send file
group.send()Mass send
chat.receive_message(who, txt, output_path)Receive message
chat.chat_robot(who)Smart chat

Examples

import PyOfficeRobot

PyOfficeRobot.chat.send_message(
who='File Transfer Assistant',
message='Hello from Python!'
)

PyOfficeRobot.chat.send_message_by_time(
who='Family', message='Happy Birthday!', time='2026-06-15 09:00:00'
)

PyOfficeRobot.chat.chat_by_keywords(
who='Friend',
keywords={'hello': 'Hi! I am a bot.', 'python': 'I recommend learning python-office'}
)
AI 办公效率课
35 讲 AI 自动化办公实战课用 Python + AI 处理 Excel、Word、PDF、邮件等办公场景。
去学习