Skip to content

binatify/wechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wechat

A new WeChat robot with golang.

Usage

New client with message handler example:

package main

import (
	"github.com/binatify/wechat/client"
	"github.com/binatify/wechat/config"
	"github.com/sirupsen/logrus"
	"os"
)

func main() {
	logrus.SetOutput(os.Stdout)
	logger := logrus.WithField("reqID", "reqID")

	c := client.New(&config.Config{
		Duration: 6,
	}, logger).Start()

	c.Listen(func(msg interface{}) {
		content := msg.(map[string]interface{})["Content"].(string)
		logger.Println(content)
	})

}

screen shot 2018-01-08 at 6 26 04 pm

Features

  • Auto login with qrcode.
  • Message linsten.
  • Messge send.

About

A new WeChat robot with golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages