โครงการหุ่นยนต์ WeChat ที่น่าสนใจค่อนข้างเหมาะสำหรับการออกแบบเป็นผู้ช่วยหุ่นยนต์อเนกประสงค์?
Dean DLL千寻框架vlw框架โปรดดูที่ไดเรกทอรี frameworkplugins สามารถขยาย plugins โดยไม่มีการบุกรุก? สังเกต:
微信的hook ที่เกี่ยวข้องดังนั้นคุณจะต้องตั้งค่าที่อยู่โทรกลับบนซอฟต์แวร์ประเภทนี้เท่านั้นDean DLL千寻framework vlw IFrameworkhook ใด ๆ คุณต้องใช้เครื่องมือค้นหาเพื่อค้นหาด้วยตัวเองตัวอย่างการทำงาน:

config.yaml สำหรับการกำหนดค่าเฉพาะ 
config.yaml สำหรับการกำหนดค่าเฉพาะ 
// IFramework 这是接入框架所定义的接口
type IFramework interface {
// Callback 这是消息回调方法,vx框架回调消息转发给该Server
Callback ( func ( * Event , IFramework ))
// GetMemePictures 获取表情包图片地址(迷因图)
// return: 图片链接(网络URL或图片base64)
GetMemePictures ( message * Message ) string
// SendText 发送文本消息
// toWxId: 好友ID/群ID
// text: 文本内容
SendText ( toWxId , text string ) error
// SendTextAndAt 发送文本消息并@,只有群聊有效
// toGroupWxId: 群ID
// toWxId: 好友ID/群ID/all
// toWxName: 好友昵称/群昵称,留空为自动获取
// text: 文本内容
SendTextAndAt ( toGroupWxId , toWxId , toWxName , text string ) error
// SendImage 发送图片消息
// toWxId: 好友ID/群ID
// path: 图片路径
SendImage ( toWxId , path string ) error
// SendShareLink 发送分享链接消息
// toWxId: 好友ID/群ID
// title: 标题
// desc: 描述
// imageUrl: 图片链接
// jumpUrl: 跳转链接
SendShareLink ( toWxId , title , desc , imageUrl , jumpUrl string ) error
// SendFile 发送文件消息
// toWxId: 好友ID/群ID/公众号ID
// path: 本地文件绝对路径
SendFile ( toWxId , path string ) error
// SendVideo 发送视频消息
// toWxId: 好友ID/群ID/公众号ID
// path: 本地视频文件绝对路径
SendVideo ( toWxId , path string ) error
// SendEmoji 发送表情消息
// toWxId: 好友ID/群ID/公众号ID
// path: 本地动态表情文件绝对路径
SendEmoji ( toWxId , path string ) error
// SendMusic 发送音乐消息
// toWxId: 好友ID/群ID/公众号ID
// name: 音乐名称
// author: 音乐作者
// app: 音乐来源(VLW需留空),酷狗/wx79f2c4418704b4f8,网易云/wx8dd6ecd81906fd84,QQ音乐/wx5aa333606550dfd5
// jumpUrl: 音乐跳转链接
// musicUrl: 网络歌曲直链
// coverUrl: 封面图片链接
SendMusic ( toWxId , name , author , app , jumpUrl , musicUrl , coverUrl string ) error
// SendMiniProgram 发送小程序消息
// toWxId: 好友ID/群ID/公众号ID
// ghId: 小程序ID
// title: 标题
// content: 内容
// imagePath: 图片路径, 本地图片路径或网络图片URL
// jumpPath: 小程序点击跳转地址,例如:pages/index/index.html
SendMiniProgram ( toWxId , ghId , title , content , imagePath , jumpPath string ) error
// SendMessageRecord 发送消息记录
// toWxId: 好友ID/群ID/公众号ID
// title: 仅供电脑上显示用,手机上的话微信会根据[显示昵称]来自动生成 谁和谁的聊天记录
// dataList:
// - wxid: 发送此条消息的人的wxid
// - nickName: 显示的昵称(可随意伪造)
// - timestamp: 10位时间戳
// - msg: 消息内容
SendMessageRecord ( toWxId , title string , dataList [] map [ string ] interface {}) error
// SendMessageRecordXML 发送消息记录(XML方式)
// toWxId: 好友ID/群ID/公众号ID
// xmlStr: 消息记录XML代码
SendMessageRecordXML ( toWxId , xmlStr string ) error
// SendFavorites 发送收藏消息
// toWxId: 好友ID/群ID/公众号ID
// favoritesId: 收藏夹ID
SendFavorites ( toWxId , favoritesId string ) error
// SendXML 发送XML消息
// toWxId: 好友ID/群ID/公众号ID
// xmlStr: XML代码
SendXML ( toWxId , xmlStr string ) error
// SendBusinessCard 发送名片消息
// toWxId: 好友ID/群ID/公众号ID
// targetWxId: 目标用户ID
SendBusinessCard ( toWxId , targetWxId string ) error
// AgreeFriendVerify 同意好友验证
// v3: 验证V3
// v4: 验证V4
// scene: 验证场景
AgreeFriendVerify ( v3 , v4 , scene string ) error
// InviteIntoGroup 邀请好友加入群组
// groupWxId: 群ID
// wxId: 好友ID
// typ: 邀请类型,1-直接拉,2-发送邀请链接
InviteIntoGroup ( groupWxId , wxId string , typ int ) error
// GetObjectInfo 获取对象信息
// wxId: 好友ID/群ID/公众号ID
// return: User, error
GetObjectInfo ( wxId string ) ( * User , error )
// GetFriends 获取好友列表
// isRefresh: 是否刷新 false-从缓存中获取,true-重新遍历二叉树并刷新缓存
// return: []*User, error
GetFriends ( isRefresh bool ) ([] * User , error )
// GetGroups 获取群组列表
// isRefresh: 是否刷新 false-从缓存中获取,true-重新遍历二叉树并刷新缓存
// return: []*User, error
GetGroups ( isRefresh bool ) ([] * User , error )
// GetGroupMembers 获取群成员列表
// groupWxId: 群ID
// isRefresh: 是否刷新 false-从缓存中获取,true-重新遍历二叉树并刷新缓存
// return: []*User, error
GetGroupMembers ( groupWxId string , isRefresh bool ) ([] * User , error )
// GetMPs 获取公众号订阅列表
// isRefresh: 是否刷新 false-从缓存中获取,true-重新遍历二叉树并刷新缓存
// return: []*User, error
GetMPs ( isRefresh bool ) ([] * User , error )
}import _ "github.com/yqchilde/wxbot/plugins/baidubaike"import _ "github.com/yqchilde/wxbot/plugins/chatgpt"import _ "github.com/yqchilde/wxbot/plugins/crazykfc"import _ "github.com/yqchilde/wxbot/plugins/memepicture"import _ "github.com/yqchilde/wxbot/plugins/moyuban"import _ "github.com/yqchilde/wxbot/plugins/pinyinsuoxie"import _ "github.com/yqchilde/wxbot/plugins/plmm"import _ "github.com/yqchilde/wxbot/plugins/weather"import _ "github.com/yqchilde/wxbot/plugins/zaobao"import _ "github.com/yqchilde/wxbot/plugins/manager"import _ "github.com/yqchilde/wxbot/plugins/ghmonitor"import _ "github.com/yqchilde/wxbot/plugins/wordcloud"import _ "github.com/yqchilde/wxbot/plugins/chaid"import _ "github.com/yqchilde/wxbot/plugins/youdaofanyi"import _ "github.com/yqchilde/wxbot/plugins/friendadd"import _ "github.com/yqchilde/wxbot/plugins/choose"import _ "github.com/yqchilde/wxbot/plugins/localimage"import _ "github.com/yqchilde/wxbot/plugins/localimagespider"คลิกเพื่อดูว่ามีคำแนะนำใดสำหรับหุ่นยนต์
git clone https://github.com/yqchilde/wxbot.git กำหนดค่า config.yaml
Debug Run หรือ Compile
go run main.gomake releasebash -c " $( curl -fsSL https://raw.fastgit.org/yqchilde/wxbot/hook/docker/run.sh ) "config.yaml ล่วงหน้ามิฉะนั้นจะมีการรายงานข้อผิดพลาด docker run -d
--name= " wxbot "
-p 9528:9528
-v $( pwd ) /config.yaml:/app/config.yaml
-v $( pwd ) /data:/app/data
yqchilde/wxbot:latestfork โครงการนี้ก่อนWXBOT_TOKEN และค่าเป็นโทเค็นที่ได้รับข้างต้นrelease ตัวคุณเองเช่น v1.0.0 wxbot นั้นรอการดำเนินการที่จะรวบรวม ถ้าคุณต้องการขยายปลั๊กอินของคุณเองคุณสามารถอ้างอิงปลั๊กอินในไดเรกทอรี plugins
ถ้าคุณต้องการขยายกรอบอื่น ๆ คุณสามารถอ้างถึงเฟรมเวิร์กในไดเรกทอรี frameworks
หากคุณต้องการเพิ่มหรือลบปลั๊กอินคุณสามารถแก้ไขรหัสในปลั๊กอินได้ YAML เพื่อลบการนำเข้าปลั๊กอินที่เกี่ยวข้องหรือเพิ่มการนำเข้าปลั๊กอินที่เกี่ยวข้องและเพียงแค่วาดภาพ
หลังจากแก้ไข plugins.yaml คุณต้องดำเนินการ make plugins หรือ go generate -tags plugins ./engine/plugins เพื่อสร้างไฟล์ plugins.go สอดคล้องกันก่อนที่จะรวบรวม
- " github.com/yqchilde/wxbot/plugins/baidubaike " # 百度百科
- " github.com/yqchilde/wxbot/plugins/chatgpt " # GPT聊天
- " github.com/yqchilde/wxbot/plugins/crazykfc " # 肯德基疯狂星期四骚话
- " github.com/yqchilde/wxbot/plugins/ghmonitor " # 公众号消息监控转发
- " github.com/yqchilde/wxbot/plugins/manager " # 群组管理相关
- " github.com/yqchilde/wxbot/plugins/memepicture " # 表情包原图
- " github.com/yqchilde/wxbot/plugins/moyuban " # 摸鱼办
- " github.com/yqchilde/wxbot/plugins/pinyinsuoxie " # 拼音缩写翻译
- " github.com/yqchilde/wxbot/plugins/plmm " # 漂亮妹妹
- " github.com/yqchilde/wxbot/plugins/weather " # 天气查询
- " github.com/yqchilde/wxbot/plugins/zaobao " # 每日早报
- " github.com/yqchilde/wxbot/plugins/wordcloud " # 聊天热词
- " github.com/yqchilde/wxbot/plugins/chaid " # 查wxId
- " github.com/yqchilde/wxbot/plugins/youdaofanyi " # 有道翻译ดูกรณีการใช้งานเพิ่มเติม
| ชื่อตัวแปรสภาพแวดล้อม | ประเภทตัวแปร | อธิบาย |
|---|---|---|
| การดีบัก | บูล | ลำดับความสำคัญมากกว่าตัวแปรอื่น ๆ ที่เริ่มต้นด้วย DEBUG_ |
| debug_log | บูล | ใช้ในการดีบักชื่อบันทึกไฟล์และหมายเลขบรรทัด |
import (
"errors"
"fmt"
"strings"
"sync"
"time"
"github.com/PullRequestInc/go-gpt3"
"github.com/yqchilde/wxbot/engine/control"
"github.com/yqchilde/wxbot/engine/pkg/log"
"github.com/yqchilde/wxbot/engine/pkg/sqlite"
"github.com/yqchilde/wxbot/engine/robot"
)插件โปรดเพิ่มปลั๊กอินที่เกี่ยวข้องใน plugins.yaml插件โปรดเพิ่มปลั๊กอินที่เกี่ยวข้องในส่วนปลั๊กอินที่มีอยู่ใน README.md插件โปรดเพิ่มปลั๊กอินที่เกี่ยวข้องใน plugins/README.mdmake plugins หรือ go generate -tags plugins ./engine/plugins เพื่อสร้างไฟล์ plugins.go ที่สอดคล้องกันก่อน แผนพัฒนา: แผนพัฒนาหากคุณพบว่าโครงการนี้น่าสนใจโปรดคลิกที่ดาว
โครงการนี้จะถูกเติมเต็มและเติมเต็มสิ่งต่าง ๆ มากมาย
หากคุณมีคำถามใด ๆ คุณสามารถเข้าร่วมกลุ่ม Q เพื่อพูดคุย

โครงการ yqchilde/wxbot ได้รับการพัฒนาในสภาพแวดล้อมการพัฒนาแบบ บูร ณาการของ Goland ภายใต้ Jetbrains
Robot Core เวอร์ชันที่ไม่ใช่ Hook ถูกนำมาใช้โดย OpenWechat SDK และการบำรุงรักษาได้ถูกระงับในสาขา nohook
ฉันใช้ Robot Framework เวอร์ชัน Hook เฟรมเวิร์กของฉันวิ่งหนีไป ตอนนี้ใช้ Qianxun , Dean Dll สำหรับ Hook Branch
Branch Hook ได้ยืมมามากจากโครงการออกแบบของโครงการที่ wechat เยี่ยมมาก ZeroBot-Plugin ZeroBot-Plugin
ใบอนุญาต AGPL-3.0