Comments (11)
@taylorshuang
from
,to
,who
都是字符串形式,如何和微信好友对应起来啊?
Done。需要调用一下接口获取一下用户列表
from wechat-go.
我打印msg的消息内容,msg.content是可以输出的,但msg.who,msg.ToUserName都是不是可读的字符串,很奇怪
from wechat-go.
消息的内容:不是我的,我是无辜的
谁:@b5bbbea72c91bda473aacbcdfdd5f875689f32ee1317928a0d9c83a5afc30c51
来自哪里:@b5bbbea72c91bda473aacbcdfdd5f875689f32ee1317928a0d9c83a5afc30c51
是不是群组:false
发送给谁:@c5924eb933bd000a2c7e4ed8a92590caac64d1642c8cd98cafda86e3b3ba23ba
from wechat-go.
contact := session.Cm.GetContactByUserName(msg.FromUserName) if contact == nil { logs.Error("ignore the messages from", msg.FromUserName) return }
,这段代码根据消息的所有者来获取群组,总感觉不对,返回都是nil
from wechat-go.
能不能把msg这个结构体的每个字段是个什么作用,在代码里面讲解下。我跑了一遍代码,toUsername应该是给别人发信息,Fromusername表示消息来自哪里,who表示谁发送消息。
我想做的一个应用,就是别人@机器人+关键字,机器人能够根据关键字回复对应的内容,但目前,别人@机器人,机器人是没法识别的。机器人只能对群里所有信息执行识别。
from wechat-go.
go的微信机器人,只有这个算全的,大家有推荐,或者一起把这个机器人维护好呀。。。
from wechat-go.
从我跑的代码来看,msg里面的字段都不是可读的字符串,不知道有没有办法变为可读。
from wechat-go.
我有空的时候看看是什么问题
from wechat-go.
@songtianyi 我测试了另一个wxbot,可以实现我说的功能。这个把版本的机器人可能太没维护了,有些功能可能有问题。
from wechat-go.
@taylorshuang from
,to
,who
都是字符串形式,如何和微信好友对应起来啊?
from wechat-go.
@max-min 请问 获取用户列表的接口是什么
from wechat-go.
Related Issues (20)
- Reclaim Your $KSM Today
- 请问怎么获取群的成员列表 HOT 1
- no handlers for key HOT 1
- 接受好友请求后似乎就报错无法使用了
- 第三方平台支持 HOT 1
- 微信收款信息是乱码,需要解密吧 HOT 1
- 还更新吗? HOT 3
- 频繁掉线,自动重新登陆失败 HOT 3
- 请问怎么判断联系人是否是公众号呢? HOT 1
- 弱弱的问一下appid和发送消息的文档在哪里可以查看申请。。 HOT 1
- 如何主动给好友发消息 HOT 2
- go mod的问题
- 微控BUG反馈帖 HOT 3
- 微信网页版登陆接口增加了环境监测实在cookie中设置的
- 不好意思,想问下如何发送本地文件夹下图片 HOT 2
- 如何邀请自己好友进群? HOT 2
- 能否弄一些管理工具函数
- 还有维护吗 HOT 5
- 能获取小程序登陆的二维码码 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wechat-go.