Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

邀请入群 #23

Closed
misakichan opened this issue Apr 1, 2017 · 6 comments
Closed

邀请入群 #23

misakichan opened this issue Apr 1, 2017 · 6 comments

Comments

@misakichan
Copy link

为什么没办法使用group的add_members和remove_members方法了。。里面username传微信昵称和微信号都不行。

@youfou
Copy link
Owner

youfou commented Apr 1, 2017

需要传入单个用户对象,或用户对象的列表。而不是昵称或微信号。

@youfou youfou closed this as completed Apr 1, 2017
@youfou
Copy link
Owner

youfou commented Apr 1, 2017

举个例子

my_friend = ensure_one(bot.search('某个人的名字'))
my_group.add_members(my_friend)

@misakichan
Copy link
Author

非常感谢您这么及时的解答,已解决。
我是当时看您在知乎https://pic4.zhimg.com/v2-2043a6c577c2dc2ff92d49456ff15fc7_b.png里写的是user_name才导致理解错误,不知道是不是有问题

@youfou
Copy link
Owner

youfou commented Apr 1, 2017

图中代码并不是我写的…

@misakichan
Copy link
Author

不好意思,想当然了~试了一下,是图中作者的问题。
顺便再问一下,用这个扫码登录后选择cache_path=True。然后使用embed阻塞,是不是只要电脑不关,就可以一直保活。微信那边有超时session过期的说法吗

@youfou
Copy link
Owner

youfou commented Apr 1, 2017

目前看,掉线通常与网络稳定性和机器人行为有关。
有些行为异常的可能会被踢下线。
我这边至少24小时没问题,没有试过很久的,因为经常更新代码重启测试。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants