GithubHelp home page GithubHelp logo

Comments (11)

max-min avatar max-min commented on May 28, 2024 1

@taylorshuang from,to,who都是字符串形式,如何和微信好友对应起来啊?

Done。需要调用一下接口获取一下用户列表

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

我打印msg的消息内容,msg.content是可以输出的,但msg.who,msg.ToUserName都是不是可读的字符串,很奇怪

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

消息的内容:不是我的,我是无辜的
谁:@b5bbbea72c91bda473aacbcdfdd5f875689f32ee1317928a0d9c83a5afc30c51
来自哪里:@b5bbbea72c91bda473aacbcdfdd5f875689f32ee1317928a0d9c83a5afc30c51
是不是群组:false
发送给谁:@c5924eb933bd000a2c7e4ed8a92590caac64d1642c8cd98cafda86e3b3ba23ba

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

contact := session.Cm.GetContactByUserName(msg.FromUserName) if contact == nil { logs.Error("ignore the messages from", msg.FromUserName) return },这段代码根据消息的所有者来获取群组,总感觉不对,返回都是nil

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

能不能把msg这个结构体的每个字段是个什么作用,在代码里面讲解下。我跑了一遍代码,toUsername应该是给别人发信息,Fromusername表示消息来自哪里,who表示谁发送消息。
我想做的一个应用,就是别人@机器人+关键字,机器人能够根据关键字回复对应的内容,但目前,别人@机器人,机器人是没法识别的。机器人只能对群里所有信息执行识别。

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

go的微信机器人,只有这个算全的,大家有推荐,或者一起把这个机器人维护好呀。。。

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

从我跑的代码来看,msg里面的字段都不是可读的字符串,不知道有没有办法变为可读。

from wechat-go.

songtianyi avatar songtianyi commented on May 28, 2024

我有空的时候看看是什么问题

from wechat-go.

taylorshuang avatar taylorshuang commented on May 28, 2024

@songtianyi 我测试了另一个wxbot,可以实现我说的功能。这个把版本的机器人可能太没维护了,有些功能可能有问题。

from wechat-go.

max-min avatar max-min commented on May 28, 2024

@taylorshuang from,to,who都是字符串形式,如何和微信好友对应起来啊?

from wechat-go.

ltto avatar ltto commented on May 28, 2024

@max-min 请问 获取用户列表的接口是什么

from wechat-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.