Skip to content
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

无法禁言匿名用户,因为群消息获得的anonymous的flag为空,id也为空 #504

Closed
anaivebird opened this issue Dec 17, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@anaivebird
Copy link

anaivebird commented Dec 17, 2020

环境信息
请根据实际使用环境修改以下信息
go-cqhttp版本: go-cqhttp-v0.9.34
运行环境: Windows 10 64位
连接方式: 反向WS
使用协议: Android

device.json:
{
"display": "gtx8",
"product": "xxxxx",
"device": "HUAWEI xxxx",
"board": "xxx",
"model": "xxx-xxxx",
"finger_print": "xxxxx/xxxxx/xxxxx/xxxxxxx/xxxxx:user/release-keys",
"boot_id": "xxxxx-2a35-4d87-8e73-1xxxxxxxxx",
"proc_version": "xxxxxxxx(xxxxxxx)",
"protocol": 1,
"imei": "真实imei"
}

bug内容
无法通过API,set_group_anonymous_ban来禁言匿名用户
因为该API需要anonymous_flag
这个flag只能通过监听群消息来获得

而获得的群消息anonymous.flag为空,anonymous.id也为空
{'anonymous': {'flag': '', 'id': 0, 'name': '嫦娥'}, 'font': 0, 'group_id': 963425306, 'message': [MessageSegment(type='text', data={'text': 'asdf'})], 'message_id': 98064478, 'message_type': 'group', 'post_type': 'message', 'raw_message': 'asdf', 'self_id': 我的qq号, 'sender': {'age': 0, 'area': '', 'level': '', 'nickname': '匿名消息', 'sex': 'unknown', 'user_id': 80000000}, 'sub_type': 'anonymous', 'time': 1608231870, 'user_id': 80000000}

复现方法
在群里用匿名发一条消息,查看收到的群消息事件的字典信息

@Mrs4s Mrs4s added the enhancement New feature or request label Dec 18, 2020
@Mrs4s
Copy link
Owner

Mrs4s commented Dec 18, 2020

目前还未支持匿名用户相关操作

@Mrs4s
Copy link
Owner

Mrs4s commented Dec 25, 2020

已支持.

@Mrs4s Mrs4s closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants