-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msg['isAt'] BUG? #27
Comments
好像发到py2.7版本里来了。。。不好意思我去3.5那边发 |
@tylor-e 因为这是2.7这里的新功能,3.5还没更新 |
@tylor-e 另外,开issue报bug无所谓的,2.7 3.5都可以直接开 |
@littlecodersh 嗯,我发现开issue也在一起。求更新或者简单的添加方法,我用Unirx的也写过这个功能,自己写满麻烦的,如果你的库集成了就最好啦~ |
@tylor-e 试试这个命令: pip install itchat --no-cache-dir |
搞定isAt的功能啦,对比了一下两个版本的文件,在client.py里加入了相关的参数,这个功能就加好了 |
@tylor-e 哈哈,好的 |
我不是专业程序员,就懂点皮毛,所以你告诉了我有差别我就去找差别,幸运的是不复杂所以就找到啦~ |
@tylor-e 厉害的! itchat.__client.storageClass.nickName
itchat.__client.storageClass.userName |
@littlecodersh 真的非常感谢你们这些有想法又能干的程序员,这样专业的模块我是弄不了,但是拿来用用真的顺手,还能让我做更多的事 |
@tylor-e 不客气的,能用到就好:) |
用了给的默认代码测试:
@itchat.msg_register('Text', isGroupChat = True)
def text_reply(msg):
if msg['isAt']:
itchat.send(u'@%s\u2005I received: %s'%(msg['ActualNickName'], msg['Content']), msg['FromUserName'])
字面意思我理解的是当@本人的时候方才回复。实际用的时候不管有无@均报错
Traceback (most recent call last):
File "D:\Py35\itchat\app.py", line 34, in
itchat.run()
File "E:\Python\Python27\Lib\site-packages\itchat-1.0.8-py2.7.egg\itchat__init__.py", line 167, in run
File "E:\Python\Python27\Lib\site-packages\itchat-1.0.8-py2.7.egg\itchat__init__.py", line 135, in configured_reply
File "D:\Py35\itchat\app.py", line 30, in text_reply
if msg['isAt']:
KeyError: 'isAt'
运行环境,windows10/python3.5.2
The text was updated successfully, but these errors were encountered: