Dwebot = Dao + WeChat + Bot, 这是一个使用 Go 语言编写的机器人,适合Dao群体在微信协作中使用
- 查询NFT地板价
- 微信标记同步discord
- 公众号更新推送群组
- 群聊消息入库
- 下载依赖包:
go mod download
- 配置文件
// 打开 config.json 配置 Discord_bot_auth,Mysql 连接 { "Discord_bot_auth": "" "Mysql_host":"", "Mysql_port":"", "Mysql_db":"", "Mysql_user":"", "Mysql_password":"" }
- 配置 discord 频道
// 打开 main.go 找到该行 discord_send_msg("频道ID", "from wechat:\n"+mark_content[0])
- 配置 公众号检测转发群组
// 打开 main.go 找到以下关键字配置 // 公众号名称 if name == "公众号名称" { // 配置 群组 msg.Owner().SendTextToGroup(groups.SearchByNickName(1, "群组名称")[0], name+"公众号更新:"+"\n"+title.Text()+"\n"+url.Text())
- 构建项目:
go build
- 运行项目:
chmod +x ./Dwebot ./Dwebot
- 项目日志:
logfile.log