MCPcopy Index your code
hub / github.com/cy1159178778/wechat_bot

github.com/cy1159178778/wechat_bot @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,114 symbols 4,151 edges 145 files 202 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wechat_bot

一个娱乐功能为主的微信机器人,基于WeChatFerry和NoneBot2开发,插件式写法,方便插拔

功能菜单

help

效果预览

常用功能

=========

对话

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo1.jpg" alt="demo1" />

表情制作

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo2-1.jpg" alt="demo2-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo2-2.png" alt="demo2-2" />

模拟抽卡

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo3-1.jpg" alt="demo3-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo3-2.png" alt="demo3-2" />

摸鱼日报

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo4-1.jpg" alt="demo4-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo4-2.png" alt="demo4-2" />

每日新闻

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo5-1.jpg" alt="demo5-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo5-2.png" alt="demo5-2" />

日报

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo6-1.jpg" alt="demo6-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo6-2.png" alt="demo6-2" />

签到

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo7-1.jpg" alt="demo7-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo7-2.png" alt="demo7-2" />

娱乐功能

=========

扫雷

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo8.jpg" alt="demo8" />

象棋

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo9.jpg" alt="demo9" />

国际象棋

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo10.jpg" alt="demo10" />

五子棋

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo11.jpg" alt="demo11" />

围棋

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo12.jpg" alt="demo12" />

黑白棋

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo13.jpg" alt="demo13" />

人生重开

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo14-1.jpg" alt="demo14-1" />
<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo14-2.jpg" alt="demo14-2" />

猜色块

<img src="https://github.com/cy1159178778/wechat_bot/blob/main/demo_image/demo15.jpg" alt="demo15" />

安装指南

  • 本项目使用 Python 3.10 开发,所以建议使用 3.10 (其他版本应该也问题不大)
  • 配套 微信 版本:3.9.10.27
  • 可以根据 requirements.txt 搭建环境,或者使用 整合包(夸克网盘, 提取码: 6xmJ) / 整合包(百度网盘, 提取码: rfhh) (不熟悉python的建议使用)

配置详情

  • common.py 中配置 admin(管理员微信id) 和 nick_name(机器人昵称)
  • 对话功能,使用阿里云通义千问,apikey获取,配置在 chat/chat.py 中的 api_key
  • 翻译功能,使用阿里云机器翻译,accesskey获取,配置在 translate/aliyun_translate.py 中的 access_key_id 和 access_key_secret
  • 绘图功能,使用flux,falkey获取,配置在 ai_draw/ init.py 中的 os.environ["FAL_KEY"],以前注册有免费额度的,现在好像没了,也可自行更换,绘图还搭配了百度云图片审核,配置在 ai_draw/check_img.py 中的 API_KEY 和 SECRET_KEY
  • 天气功能,使用和风天气,apikey获取,配置在 heweather/heweather.py 中的 api_key
  • 图片功能、视频功能、签到、运行状态、kfc、舔狗日记、随机小说,目前是用的本地文件(嫌api不稳定),需下载 file(夸克网盘, 提取码: YwGB) / file(百度网盘, 提取码: 5tih),各个压缩包解压到当前文件夹,然后放到 file 下,也可自行更换api
  • 定时发送每日新闻和摸鱼日报,requests_api/ init.py 中的 task_group 配置微信群id
  • 点歌需要安装ffmpeg
  • 表情制作功能,如果是自己搭建的环境,需要下载表情资源,控制台输入meme download,整合包则不需要

使用说明

特别感谢

Core symbols most depended-on inside this repo

get
called by 324
wechat_bot/src/plugins/boardgame/game.py
send_text
called by 168
wechat_bot/common.py
paste
called by 100
wechat_bot/image_utils.py
open
called by 90
wechat_bot/src/plugins/cchess/engine.py
send_image
called by 61
wechat_bot/common.py
get
called by 47
wechat_bot/src/plugins/draw_card/handles/arknights_toolkit/recruit.py
text
called by 46
wechat_bot/src/plugins/boardgame/svg.py
pop
called by 29
wechat_bot/src/plugins/cchess/board.py

Shape

Method 597
Function 295
Class 220
Route 2

Languages

Python100%
TypeScript1%

Modules by API surface

wechat_bot/image_utils.py71 symbols
wechat_bot/src/plugins/boardgame/game.py46 symbols
wechat_bot/src/plugins/remake/property.py35 symbols
wechat_bot/src/plugins/picstatus/collectors/__init__.py32 symbols
wechat_bot/src/plugins/cchess/board.py31 symbols
wechat_bot/src/plugins/boardgame/othello_ai.py30 symbols
wechat_bot/src/plugins/draw_card/handles/base_handle.py29 symbols
wechat_bot/src/plugins/cchess/move.py29 symbols
wechat_bot/src/plugins/draw_card/handles/arknights_toolkit/recruit.py28 symbols
wechat_bot/src/plugins/draw_card/handles/arknights_toolkit/record/drawer.py27 symbols
wechat_bot/common.py25 symbols
wechat_bot/src/plugins/remake/drawer.py23 symbols

For agents

$ claude mcp add wechat_bot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact