gitmyhub

wechat-bot

JavaScript ★ 11k updated 7d ago

🤖一个基于 WeChaty 结合 ChatGPT / Claude / Kimi / DeepSeek / Ollama等Ai服务实现的微信机器人 ,可以用来帮助你自动回复微信消息,或者社群分析/好友管理,检测僵尸粉等...

A WeChat chatbot that routes incoming messages to AI models like ChatGPT or DeepSeek and sends AI-generated replies back automatically, with support for whitelisting specific contacts or groups.

JavaScriptNode.jsWechatysetup: moderatecomplexity 3/5

This is a WeChat bot that connects your WeChat account to AI services so that incoming messages can be answered automatically. The README is written in Chinese. After scanning a QR code to log in, messages sent to the bot in private chats or group conversations are routed through an AI model of your choice, and the response is sent back through WeChat.

The project is built on top of Wechaty, an existing library that provides a programmatic interface to WeChat. The bot supports a whitelist system, where only messages from contacts or groups whose names you specify in a configuration file will trigger AI replies. Messages that are not plain text, such as images or voice messages, are not processed by the reply pipeline.

Several AI backends are supported. You can configure it to use ChatGPT, DeepSeek, Kimi, Doubao, Claude, Tongyi (Alibaba Cloud), Xunfei, Dify, Ollama (a local model runner), or the 302.AI aggregator. Each requires its own API key, which you add to a .env configuration file. Ollama is notable because it runs models locally on your own machine, so no external API key or internet connection to a cloud provider is needed for that option.

Beyond automated replies, the tool also integrates with a separate project called OpenCLI, which allows you to query your local WeChat chat history, contact list, and group members from the command line. There is also a feature to analyze group chats or individual contacts using AI, generating a statistical or deep summary of conversation patterns.

The README includes a warning that WeChat monitors and penalizes accounts that use unofficial web protocols, and advises using a secondary account and keeping the whitelist narrow to reduce the risk of account suspension.

Where it fits