Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Go.
"Wechaty is a great solution, I believe there would be much more users recognize it." link
— @Gcaufy, Tencent Engineer, Author of WePY"太好用,好用的想哭"
— @xinbenlv, Google Engineer, Founder of HaoShiYou.org"最好的微信开发库" link
— @Jarvis, Baidu Engineer"Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" link
— @lijiarui, Founder & CEO of Juzi.BOT."If you know js ... try Wechaty, it's easy to use."
— @Urinx Uri Lee, Author of WeixinBot(Python)
See more at Wiki:Voice Of Developer
Wechaty is used in many ChatBot projects by thousands of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code go wechaty, join our Wechaty Go Developers' Home.
Scan now, because other Wechaty Go developers want to talk with you too! (secret code: go wechaty)
package main
import (
"fmt"
"github.com/wechaty/go-wechaty/wechaty"
"github.com/wechaty/go-wechaty/wechaty-puppet/schemas"
"github.com/wechaty/go-wechaty/wechaty/user"
)
func main() {
wechaty.NewWechaty().
OnScan(func(context *wechaty.Context, qrCode string, status schemas.ScanStatus, data string) {
fmt.Printf("Scan QR Code to login: %s\nhttps://wechaty.github.io/qrcode/%s\n", status, qrCode)
}).
OnLogin(func(context *wechaty.Context, user *user.ContactSelf) {
fmt.Printf("User %s logined\n", user)
}).
OnMessage(func(context *wechaty.Context, message *user.Message) {
fmt.Printf("Message: %s\n", message)
}).DaemonStart()
}
- Go 1.18+
# go get wechaty
go get github.com/wechaty/go-wechaty
make install
make test
- wechaty-puppet-service: WECHATY_PUPPET_SERVICE_TOKEN not found ?
- go-wechaty is the go language implementation of wechaty (TypeScript). Puppet is required to start wechaty, but it is currently known that puppets are written in TypeScript language. In order to enable go-wechaty to use these puppets, we can use wechaty-gateway to convert puppets into grpc service, let go-wechaty connect to the grpc service, go-wechaty -> wechaty-gateway -> puppet, document: https://wechaty.js.org/docs/puppet-services/diy/
- puppet list: https://wechaty.js.org/docs/puppet-providers/
- Learn Go in 12 Minutes
- How to Write Go Code
- Journey from OO language to Golang - Sergey Kibish @DevFest Switzerland 2018
- The Go Blog - Publishing Go Modules
- Effective Go
- Golang for Node.js Developers - Examples of Golang examples compared to Node.js for learning
- Learning Go as a Node.js Developer
- Golang Tutorial for Node.js Developers
Go Wechaty Scala Wechaty BETA Released!
Read more from our Multi-language Wechaty Beta Release event from our blog:
- Welcome our second and third Go Wechaty contributors:
- Bojie LI (李博杰) https://github.com/SilkageNet #9
- Chaofei DING (丁超飞) https://github.com/dchaofei #20
- Enable GitHub Actions
- Add Makefile for easy developing
- Re-structure module directories: from
src/wechaty
towechaty
- Rename example bot to
examples/ding-dong-bot.go
- Project created.
- Welcome our first Go Wechaty contributor:
- Xiaoyu DING (丁小雨) https://github.com/dingdayu #2
- Wechaty - Conversatioanl AI Chatot SDK for Wechaty Individual Accounts (TypeScript)
- Python Wechaty - Python WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Python)
- Go Wechaty - Go WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Go)
- Java Wechaty - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java)
- Scala Wechaty - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala)
[![Wechaty in Go](https://img.shields.io/badge/Wechaty-Go-7de)](https://github.com/wechaty/go-wechaty)
- @SilkageNet - Bojie LI (李博杰)
- @huan - Huan LI (李卓桓)
- Code & Docs © 2020 Wechaty Contributors https://github.com/wechaty
- Code released under the Apache-2.0 License
- Docs released under Creative Commons