跳转到主要内容

微信群组管理

个微信群组管理相关命令,使用 wx 前缀

SKILL 名称

SKILL 名称说明
juhecli-wx-room个微群组管理 - 群信息/成员/创建/加人/踢人/改名/公告/置顶/免打扰/转让等 21+ 命令

创建群聊

创建一个新的群聊。

语法

bash
juhe-cli wx room create '{"username_list": ["wxid_a", "wxid_b"]}'

参数

参数类型必填说明
username_liststring[]要加入群聊的用户ID列表

示例

bash
juhe-cli wx room create '{"username_list": ["wxid_abc123", "wxid_def456"]}'

获取群信息

获取群聊的详细信息。

语法

bash
juhe-cli wx room get_info '{"username": "xxx@chatroom"}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)

示例

bash
juhe-cli wx room get_info '{"username": "123456789@chatroom"}'

获取群成员

获取群聊的所有成员列表。

语法

bash
juhe-cli wx room get_members '{"username": "xxx@chatroom"}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)

示例

bash
juhe-cli wx room get_members '{"username": "123456789@chatroom"}'

邀请入群

邀请用户加入群聊。

语法

bash
juhe-cli wx room invite '{"username": "xxx@chatroom", "username_list": ["wxid_a"]}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)
username_liststring[]要邀请的用户ID列表

示例

bash
juhe-cli wx room invite '{"username": "123456789@chatroom", "username_list": ["wxid_newuser"]}'

移出群聊

将成员移出群聊。

语法

bash
juhe-cli wx room remove '{"username": "xxx@chatroom", "username_list": ["wxid_a"]}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)
username_liststring[]要移出的用户ID列表

示例

bash
juhe-cli wx room remove '{"username": "123456789@chatroom", "username_list": ["wxid_remove"]}'

修改群名

修改群聊名称。

语法

bash
juhe-cli wx room modify_name '{"username": "xxx@chatroom", "room_name": "新群名"}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)
room_namestring新的群名称

示例

bash
juhe-cli wx room modify_name '{"username": "123456789@chatroom", "room_name": "新群名"}'

修改群公告

修改群聊公告。

语法

bash
juhe-cli wx room modify_notice '{"username": "xxx@chatroom", "notice": "群公告"}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)
noticestring群公告内容

示例

bash
juhe-cli wx room modify_notice '{"username": "123456789@chatroom", "notice": "欢迎加入本群"}'

退出群聊

退出指定的群聊。

语法

bash
juhe-cli wx room quit '{"username": "xxx@chatroom"}'

参数

参数类型必填说明
usernamestring群聊ID(@chatroom结尾)

示例

bash
juhe-cli wx room quit '{"username": "123456789@chatroom"}'