Home

Awesome

go-wechaty

Go Version Go Maintainability

Go Wechaty

Go Wechaty Getting Started Wechaty in Go

Connecting Chatbots

Powered by Wechaty

Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Go.

Voice of the Developers

"Wechaty is a great solution, I believe there would be much more users recognize it." link
<cite>@Gcaufy, Tencent Engineer, Author of WePY</cite>

"太好用,好用的想哭"
<cite>@xinbenlv, Google Engineer, Founder of HaoShiYou.org</cite>

"最好的微信开发库" link
<cite>@Jarvis, Baidu Engineer</cite>

"Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" link
<cite>@lijiarui, Founder & CEO of Juzi.BOT.</cite>

"If you know js ... try Wechaty, it's easy to use."
<cite>@Urinx Uri Lee, Author of WeixinBot(Python)</cite>

See more at Wiki:Voice Of Developer

Join Us

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.

Wechaty Friday.BOT QR Code

Scan now, because other Wechaty Go developers want to talk with you too! (secret code: go wechaty)

Usage

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()
}

Requirements

  1. Go 1.18+

Install

# go get wechaty

go get github.com/wechaty/go-wechaty

Development

make install
make test

QA

See Also

Golang for Node.js Developer

History

master

v0.4 (Jun 19, 2020)

Go Wechaty Scala Wechaty BETA Released!

Read more from our Multi-language Wechaty Beta Release event from our blog:

v0.1 (Apr 03 2020)

  1. Welcome our second and third Go Wechaty contributors:
  2. Enable GitHub Actions
    1. Enable linting: golint
    2. Enable testing: testing
  3. Add Makefile for easy developing
  4. Re-structure module directories: from src/wechaty to wechaty
  5. Rename example bot to examples/ding-dong-bot.go

v0.0.1 (Mar 12, 2020)

  1. Project created.
  2. Welcome our first Go Wechaty contributor:

Related Projects

Badge

Wechaty in Go

[![Wechaty in Go](https://img.shields.io/badge/Wechaty-Go-7de)](https://github.com/wechaty/go-wechaty)

Contributors

contributor contributor contributor contributor contributor contributor contributor contributor

  1. @SilkageNet - Bojie LI (李博杰)
  2. @huan - Huan LI (李卓桓)

Creators

Copyright & License

Thanks

<a href="https://www.jetbrains.com/?from=go-wechaty"><img src="/docs/images/goland.png" width = "75px" height = "75px" alt="goland.png" /></a>