mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
docs: add correct comments on fields
This commit is contained in:
parent
20a37fe2de
commit
45df093fac
@ -26,36 +26,70 @@ export interface GetFileListParam {
|
|||||||
|
|
||||||
export enum ElementType {
|
export enum ElementType {
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
|
|
||||||
TEXT = 1,
|
TEXT = 1,
|
||||||
|
|
||||||
PIC = 2,
|
PIC = 2,
|
||||||
|
|
||||||
FILE = 3,
|
FILE = 3,
|
||||||
|
|
||||||
PTT = 4,
|
PTT = 4,
|
||||||
|
|
||||||
VIDEO = 5,
|
VIDEO = 5,
|
||||||
|
|
||||||
FACE = 6,
|
FACE = 6,
|
||||||
|
|
||||||
REPLY = 7,
|
REPLY = 7,
|
||||||
|
|
||||||
WALLET = 9,
|
WALLET = 9,
|
||||||
GreyTip = 8,//Poke别叫戳一搓了 官方名字拍一拍 戳一戳是另一个名字
|
|
||||||
|
/**
|
||||||
|
* “小灰条”,包括拍一拍 (Poke)、撤回提示等
|
||||||
|
*/
|
||||||
|
GreyTip = 8,
|
||||||
|
|
||||||
ARK = 10,
|
ARK = 10,
|
||||||
|
|
||||||
MFACE = 11,
|
MFACE = 11,
|
||||||
|
|
||||||
LIVEGIFT = 12,
|
LIVEGIFT = 12,
|
||||||
|
|
||||||
STRUCTLONGMSG = 13,
|
STRUCTLONGMSG = 13,
|
||||||
|
|
||||||
MARKDOWN = 14,
|
MARKDOWN = 14,
|
||||||
|
|
||||||
GIPHY = 15,
|
GIPHY = 15,
|
||||||
|
|
||||||
MULTIFORWARD = 16,
|
MULTIFORWARD = 16,
|
||||||
|
|
||||||
INLINEKEYBOARD = 17,
|
INLINEKEYBOARD = 17,
|
||||||
|
|
||||||
INTEXTGIFT = 18,
|
INTEXTGIFT = 18,
|
||||||
|
|
||||||
CALENDAR = 19,
|
CALENDAR = 19,
|
||||||
|
|
||||||
YOLOGAMERESULT = 20,
|
YOLOGAMERESULT = 20,
|
||||||
|
|
||||||
AVRECORD = 21,
|
AVRECORD = 21,
|
||||||
|
|
||||||
FEED = 22,
|
FEED = 22,
|
||||||
|
|
||||||
TOFURECORD = 23,
|
TOFURECORD = 23,
|
||||||
|
|
||||||
ACEBUBBLE = 24,
|
ACEBUBBLE = 24,
|
||||||
|
|
||||||
ACTIVITY = 25,
|
ACTIVITY = 25,
|
||||||
|
|
||||||
TOFU = 26,
|
TOFU = 26,
|
||||||
|
|
||||||
FACEBUBBLE = 27,
|
FACEBUBBLE = 27,
|
||||||
|
|
||||||
SHARELOCATION = 28,
|
SHARELOCATION = 28,
|
||||||
|
|
||||||
TASKTOPMSG = 29,
|
TASKTOPMSG = 29,
|
||||||
|
|
||||||
RECOMMENDEDMSG = 43,
|
RECOMMENDEDMSG = 43,
|
||||||
|
|
||||||
ACTIONBAR = 44
|
ACTIONBAR = 44
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -844,56 +878,142 @@ export enum NTSubMsgType {
|
|||||||
}
|
}
|
||||||
export interface RawMessage {
|
export interface RawMessage {
|
||||||
parentMsgPeer: Peer;
|
parentMsgPeer: Peer;
|
||||||
parentMsgIdList: string[];
|
|
||||||
id?: number;//扩展字段 用于处理OB11 ID
|
|
||||||
guildId: string;
|
|
||||||
msgRandom: string;
|
|
||||||
|
|
||||||
|
parentMsgIdList: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展字段,与 Ob11 msg ID 有关
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
|
||||||
|
guildId: string;
|
||||||
|
|
||||||
|
msgRandom: string;
|
||||||
|
|
||||||
msgId: string;
|
msgId: string;
|
||||||
|
|
||||||
// 时间戳,秒
|
/**
|
||||||
|
* 消息时间戳(秒)
|
||||||
|
*/
|
||||||
msgTime: string;
|
msgTime: string;
|
||||||
|
|
||||||
msgSeq: string;
|
msgSeq: string;
|
||||||
|
|
||||||
msgType: NTMsgType;
|
msgType: NTMsgType;
|
||||||
|
|
||||||
subMsgType: NTSubMsgType;
|
subMsgType: NTSubMsgType;
|
||||||
|
|
||||||
senderUid: string;
|
senderUid: string;
|
||||||
senderUin: string; // 发送者QQ号
|
|
||||||
peerUid: string; // 群号 或者 QQ uid
|
/**
|
||||||
peerUin: string; // 群号 或者 发送者QQ号
|
* 发送者 QQ 号
|
||||||
|
*/
|
||||||
|
senderUin: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 群号 / 用户 UID
|
||||||
|
*/
|
||||||
|
peerUid: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 群号 / 用户 QQ 号
|
||||||
|
*/
|
||||||
|
peerUin: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送者昵称(如果是好友消息)
|
||||||
|
*/
|
||||||
sendNickName: string;
|
sendNickName: string;
|
||||||
sendMemberName?: string; // 发送者群名片
|
|
||||||
|
/**
|
||||||
|
* 发送者群名片(如果是群消息)
|
||||||
|
*/
|
||||||
|
sendMemberName?: string;
|
||||||
|
|
||||||
chatType: ChatType;
|
chatType: ChatType;
|
||||||
sendStatus?: number; // 消息状态,别人发的2是已撤回,自己发的2是已发送
|
|
||||||
recallTime: string; // 撤回时间, "0"是没有撤回
|
/**
|
||||||
|
* 消息状态,别人发的 2 是已撤回,自己发的 2 是已发送
|
||||||
|
*/
|
||||||
|
sendStatus?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤回时间,"0" 是没有撤回
|
||||||
|
*/
|
||||||
|
recallTime: string;
|
||||||
|
|
||||||
records: RawMessage[];
|
records: RawMessage[];
|
||||||
elements: {
|
|
||||||
elementId: string;
|
elements: ElementWrapper[];
|
||||||
elementType: ElementType;
|
}
|
||||||
replyElement: {
|
|
||||||
sourceMsgIdInRecords: string;
|
/**
|
||||||
senderUid: string; // 原消息发送者QQ号
|
* 并非原生接口类型,故以 type 包装
|
||||||
sourceMsgIsIncPic: boolean; // 原消息是否有图片
|
*/
|
||||||
sourceMsgText: string;
|
export type ElementWrapper = {
|
||||||
replayMsgSeq: string; // 源消息的msgSeq,可以通过这个找到源消息的msgId
|
elementId: string;
|
||||||
};
|
|
||||||
textElement: {
|
elementType: ElementType;
|
||||||
atType: AtType;
|
|
||||||
atUid: string; // QQ号
|
replyElement?: {
|
||||||
content: string;
|
sourceMsgIdInRecords: string;
|
||||||
atNtUid: string; // uid号
|
|
||||||
};
|
/**
|
||||||
picElement: PicElement;
|
* 源消息发送者 QQ 号
|
||||||
pttElement: PttElement;
|
*/
|
||||||
arkElement: ArkElement;
|
senderUid: string;
|
||||||
grayTipElement: GrayTipElement;
|
|
||||||
faceElement: FaceElement;
|
/**
|
||||||
videoElement: VideoElement;
|
* 源消息是否有图片
|
||||||
fileElement: FileElement;
|
*/
|
||||||
marketFaceElement: MarketFaceElement;
|
sourceMsgIsIncPic: boolean;
|
||||||
inlineKeyboardElement: InlineKeyboardElement;
|
|
||||||
markdownElement: MarkdownElement;
|
/**
|
||||||
multiForwardMsgElement: MultiForwardMsgElement;
|
* 源消息文本
|
||||||
}[];
|
*/
|
||||||
|
sourceMsgText: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 源消息的 msgSeq,可以通过这个找到源消息的 msgId
|
||||||
|
*/
|
||||||
|
replayMsgSeq: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
textElement?: {
|
||||||
|
atType: AtType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被 @ 的 QQ 号
|
||||||
|
*/
|
||||||
|
atUid: string;
|
||||||
|
|
||||||
|
content: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被 @ 的 UID(从这里可以看出来 UID 的概念是 NT 才引入的)
|
||||||
|
*/
|
||||||
|
atNtUid: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
picElement?: PicElement;
|
||||||
|
|
||||||
|
pttElement?: PttElement;
|
||||||
|
|
||||||
|
arkElement?: ArkElement;
|
||||||
|
|
||||||
|
grayTipElement?: GrayTipElement;
|
||||||
|
|
||||||
|
faceElement?: FaceElement;
|
||||||
|
|
||||||
|
videoElement?: VideoElement;
|
||||||
|
|
||||||
|
fileElement?: FileElement;
|
||||||
|
|
||||||
|
marketFaceElement?: MarketFaceElement;
|
||||||
|
|
||||||
|
inlineKeyboardElement?: InlineKeyboardElement;
|
||||||
|
|
||||||
|
markdownElement?: MarkdownElement;
|
||||||
|
|
||||||
|
multiForwardMsgElement?: MultiForwardMsgElement;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user