Impl invite chatroom member. Close #69

This commit is contained in:
Changhua
2023-12-06 22:05:27 +08:00
parent 350d426fee
commit d0b8cc2305
10 changed files with 135 additions and 9 deletions
+17
View File
@@ -815,6 +815,23 @@ class Wcf():
rsp = self._send_request(req)
return rsp.status
def invite_chatroom_members(self, roomid: str, wxids: str) -> int:
"""邀请群成员
Args:
roomid (str): 群的 id
wxids (str): 要邀请成员的 wxid, 多个用逗号`,`分隔
Returns:
int: 1 为成功,其他失败
"""
req = wcf_pb2.Request()
req.func = wcf_pb2.FUNC_INV_ROOM_MEMBERS # FUNC_INV_ROOM_MEMBERS
req.m.roomid = roomid
req.m.wxids = wxids.replace(" ", "")
rsp = self._send_request(req)
return rsp.status
def get_chatroom_members(self, roomid: str) -> Dict:
"""获取群成员
File diff suppressed because one or more lines are too long