We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
上报消息,示例如下: {"post_type":"message","message_type":"private","time":1682421865,"self_id":2200000051,"sub_type":"friend","font":0,"sender":{"age":0,"nickname":"PokeBox","sex":"unknown","user_id":930000005},"message_id":1750478322,"user_id":930000005,"target_id":2200000051,"message":[{"type":"text","data":{"text":"hi"}}],"raw_message":"hi"} 和string格式的上报消息不同,需要对消息格式做处理。 下面是能正常使用的string的消息格式: {"post_type":"message","message_type":"private","time":1682421386,"self_id":2200000051,"sub_type":"friend","message_id":1642095065,"user_id":930000005,"target_id":2200000051,"message":"!help","raw_message":"!help","font":0,"sender":{"age":0,"nickname":"PokeBox","sex":"unknown","user_id":930000005}}
上报消息,示例如下:
{"post_type":"message","message_type":"private","time":1682421865,"self_id":2200000051,"sub_type":"friend","font":0,"sender":{"age":0,"nickname":"PokeBox","sex":"unknown","user_id":930000005},"message_id":1750478322,"user_id":930000005,"target_id":2200000051,"message":[{"type":"text","data":{"text":"hi"}}],"raw_message":"hi"}
和string格式的上报消息不同,需要对消息格式做处理。 下面是能正常使用的string的消息格式:
{"post_type":"message","message_type":"private","time":1682421386,"self_id":2200000051,"sub_type":"friend","message_id":1642095065,"user_id":930000005,"target_id":2200000051,"message":"!help","raw_message":"!help","font":0,"sender":{"age":0,"nickname":"PokeBox","sex":"unknown","user_id":930000005}}
报错导致的原因与go-cqhttp版本并无太大关系,当我使用的go-cqhttp版本是v1.0.0-rc5,目前几乎所有版本均支持string或array两种消息格式,设置方法为编辑config.yml文件,找到message下的post-format选项,并把值设置为array: message: # 上报数据类型 # 可选: string,array post-format: array 重启go-cqhttp和QChatGPT后,给机器人发送任意消息,即可复现上述bug。
报错导致的原因与go-cqhttp版本并无太大关系,当我使用的go-cqhttp版本是v1.0.0-rc5,目前几乎所有版本均支持string或array两种消息格式,设置方法为编辑config.yml文件,找到message下的post-format选项,并把值设置为array:
config.yml
message
post-format
message: # 上报数据类型 # 可选: string,array post-format: array
重启go-cqhttp和QChatGPT后,给机器人发送任意消息,即可复现上述bug。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: