Class ChatHistory code
- 程序集
- Another-Mirai-Native.Abstractions.dll
表示框架持久化记录的聊天记录的类。该类包含了聊天记录的基本属性,如消息内容、发送者信息、消息类型等。
public class ChatHistory
- 继承
-
ChatHistory
- 继承成员
构造函数
ChatHistory() code
public ChatHistory()
属性
ID code
持久化ID
public int ID { get; set; }
属性值
Message code
消息内容,包含未经处理的原始消息文本,可能包含CQ码等特殊格式。
public string Message { get; set; }
属性值
MessageId code
消息ID,用于撤回、引用等操作
public int MessageId { get; set; }
属性值
ParentID code
群号或QQ
public long ParentID { get; set; }
属性值
PluginName code
由哪个插件发送的消息,如果是用户发送的消息则为 string.Empty
public string PluginName { get; set; }
属性值
Recalled code
是否已撤回
public bool Recalled { get; set; }
属性值
SenderID code
发送者ID,如果是群聊则为QQ,如果是私聊则与 ParentID 相同,如果是通知则为0
public long SenderID { get; set; }
属性值
Time code
记录发生的时间
public DateTime Time { get; set; }
属性值
Type code
聊天记录类别
public ChatHistoryType Type { get; set; }