-
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
请问如何判断自已是不是群主?谢谢 #18
Comments
@1265858594 最简单的方法是通过群名做判断,稍复杂一些的是判断群成员本人属性的 |
我马上找时间测试这三种方法,不过还是有点不太懂,
|
|
昨晚对于第2项的测试结果是 其中每次登入时间间隔10-30分钟,所有的 AttrStatus 全部都没有区分 |
@1265858594 有理!是我没测试好,我修改一下方案。 itchat.get_chatrooms() |
我思考一下哦,想让程序全自动判断,而不是人为的去进行设置.. |
@1265858594 我忘记了最直观的 python -m pip install itchat --upgrade 更新以后可以尝试该程序: import itchat
itchat.auto_login()
chatrooms = itchat.get_chatrooms()
for chatroom in chatrooms:
info = itchat.get_batch_contract(chatroom['UserName'])
if info['isAdmin']: print(info['PYQuanPin']) |
太好了,回家马上试..试完报告结果 |
昨晚最后测试的结果, |
@1265858594 我给的测试程序也不可用吗? |
@littlecodersh 我是没有用你给的程序,但是我是看你的代码改的, get_batch_contract 里面 |
试一下这个程序,也显示全部都是0吗? import itchat
itchat.auto_login()
chatrooms = itchat.get_chatrooms()
for chatroom in chatrooms:
info = itchat.get_batch_contract(chatroom['UserName'])
print info['OwnerUin'], info['PYQuanPin'] |
下午试..get_contract 没注意到 |
刚刚看 |
@1265858594 这个程序打出来也全是0么? import itchat
itchat.auto_login()
chatrooms = itchat.get_chatrooms()
for chatroom in chatrooms:
info = itchat.get_batch_contract(chatroom['UserName'])
print info['OwnerUin'], info['PYQuanPin'] |
在请教一下,关于定位唯一账号的问题。 2、 环境是py 3.5.1 |
@pcloth 重开个issue,@一下Chyroc吧 |
@pcloth |
@littlecodersh 应该是,我没有去改动 OwnerUin |
@1265858594 了解。 |
@littlecodersh 请问什么是 sslkey ? 是 skey 那串 |
@1265858594 不好意思,我没说清楚 |
@littlecodersh 感谢指导,最后的最后,终于找出问题 |
@1265858594 哈哈,好的 |
@littlecodersh 灰常感谢 |
补充一下,回想起当时为什麽使用 @@来判断群, |
我想列出自已是群主的群,在这些群里面,才回应member的对话
如果 member 出现某些黑名单关键字,就把memeber踢了
所以有两点关键刚好都跟是不是群主相关
谢谢
命令行也ok 谢谢
The text was updated successfully, but these errors were encountered: