mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-25 08:57:51 +08:00
chroe: specify necessary property in chatmessage
This commit is contained in:
@@ -1,27 +1,29 @@
|
||||
|
||||
"""
|
||||
本类表示聊天消息,用于对itchat和wechaty的消息进行统一的封装
|
||||
本类表示聊天消息,用于对itchat和wechaty的消息进行统一的封装。
|
||||
|
||||
填好必填项(群聊6个,非群聊8个),即可接入ChatChannel,并支持插件,参考TerminalChannel
|
||||
|
||||
ChatMessage
|
||||
msg_id: 消息id
|
||||
msg_id: 消息id (必填)
|
||||
create_time: 消息创建时间
|
||||
|
||||
ctype: 消息类型 : ContextType
|
||||
content: 消息内容, 如果是声音/图片,这里是文件路径
|
||||
ctype: 消息类型 : ContextType (必填)
|
||||
content: 消息内容, 如果是声音/图片,这里是文件路径 (必填)
|
||||
|
||||
from_user_id: 发送者id
|
||||
from_user_id: 发送者id (必填)
|
||||
from_user_nickname: 发送者昵称
|
||||
to_user_id: 接收者id
|
||||
to_user_id: 接收者id (必填)
|
||||
to_user_nickname: 接收者昵称
|
||||
|
||||
other_user_id: 对方的id,如果你是发送者,那这个就是接收者id,如果你是接收者,那这个就是发送者id,如果是群消息,那这一直是群id
|
||||
other_user_id: 对方的id,如果你是发送者,那这个就是接收者id,如果你是接收者,那这个就是发送者id,如果是群消息,那这一直是群id (必填)
|
||||
other_user_nickname: 同上
|
||||
|
||||
is_group: 是否是群消息
|
||||
is_at: 是否被at
|
||||
is_group: 是否是群消息 (群聊必填)
|
||||
is_at: 是否被at
|
||||
|
||||
- (群消息时,一般会存在实际发送者,是群内某个成员的id和昵称,下列项仅在群消息时存在)
|
||||
actual_user_id: 实际发送者id
|
||||
actual_user_id: 实际发送者id (群聊必填)
|
||||
actual_user_nickname:实际发送者昵称
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user