From ddbf1500332fbe463de8c8c581634458f341cc6f Mon Sep 17 00:00:00 2001 From: "Wesley F. Young" Date: Tue, 10 Dec 2024 21:03:13 +0800 Subject: [PATCH] Initial commit --- .gitignore | 1 + index.html | 6376 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 6377 insertions(+) create mode 100644 .gitignore create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..dcef414 --- /dev/null +++ b/index.html @@ -0,0 +1,6376 @@ + + + + + Laana V1 Draft + + + + + + + + + + +

Laana V1 Draft

+ +

Table of Contents

+ +
+ +
+ + + +
+

entity/file.proto

Top +
+

+ + +

GroupFile

+

群文件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID,用于获取文件数据

namestring

文件名

sizeuint64

文件大小

businessIduint32

文件类型

uploaderUinstring

上传者 Uin

uploadTimeuint64

上传时间

modifyTimeuint64

修改时间

downloadCountuint32

下载次数

lastModifyTimeuint64optional

最后修改时间

expireTimeuint64optional

过期时间

+ + + + + +

GroupFolder

+

群文件夹

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
folderIdstring

文件夹 ID

namestring

文件夹名

creatorUinstring

创建者 Uin

createTimeuint64

创建时间

fileCountuint32

包含的文件数量

+ + + + + +

LaanaFile

+

Laana 文件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
urlstring

cacheIdstring

rawbytes

+ + + + + + + + + + + + + +
+

entity/message.proto

Top +
+

+ + +

LaanaMessage

+

Laana 消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
msgSequint64

消息序列号

timeuint64

时间戳

senderUinstring

发送者 Uin

peerLaanaPeer

消息来源

bubbleLaanaMessage.Bubble

fileLaanaMessage.NormalFile

singleImageLaanaMessage.SingleImage

marketFaceLaanaMessage.MarketFace

videoLaanaMessage.Video

voiceLaanaMessage.Voice

linkCardLaanaMessage.LinkCard

contactCardLaanaMessage.ContactCard

musicCardLaanaMessage.MusicCard

locationCardLaanaMessage.LocationCard

forwardedMsgRefLaanaMessage.ForwardedMessageRef

转发消息不进行递归解析,而是提供一个引用 ID,延迟解析,防止占用过多资源

xmlMessageLaanaMessage.XmlMessage

arkMessageLaanaMessage.ArkMessage

unknownMessageLaanaMessage.UnknownMessage

extendedMessageLaanaMessage.ExtendedMessage

+ + + + + +

LaanaMessage.ArkMessage

+

卡片消息

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
jsonstring

Json 内容

+ + + + + +

LaanaMessage.Bubble

+

气泡消息,也即传统的图文混排消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
segmentsLaanaMessage.Bubble.Segmentrepeated

消息包含的段落

repliedMsgSequint64optional

引用(回复)的消息的 msgSeq

+ + + + + +

LaanaMessage.Bubble.Segment

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
textstring

一个 Segment 可以是纯文本

faceuint32

一个 Segment 可以是 QQ 表情

atLaanaMessage.Bubble.Segment.At

一个 Segment 可以是 At(提及)某人

imageLaanaFile

一个 Segment 可以是图片

+ + + + + +

LaanaMessage.Bubble.Segment.At

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
uinstring

被提及人的 Uin

namestring

被提及人的昵称

+ + + + + +

LaanaMessage.ContactCard

+

推荐联系人卡片消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
typeLaanaMessage.ContactCard.Type

联系人类型

uinstring

联系人 Uin

+ + + + + +

LaanaMessage.ExtendedMessage

+

扩展消息,与 UnknownMessage 的区别在于,ExtendedMessage 的 content 是 protobuf 序列化的消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
typestring

消息类型

contentbytes

消息内容

+ + + + + +

LaanaMessage.ForwardedMessage

+

合并转发消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
refIdstring

转发消息的引用 ID

messagesLaanaMessagerepeated

包含的消息

+ + + + + +

LaanaMessage.ForwardedMessageRef

+

合并转发消息引用

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
refIdstring

转发消息的引用 ID,用于获取转发消息本身

displayTextstring

转发的消息

+ + + + + +

LaanaMessage.LinkCard

+

链接卡片消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
urlstring

卡片链接

titlestring

卡片标题

descriptionstringoptional

卡片描述

imageLaanaFileoptional

卡片预览图片

+ + + + + +

LaanaMessage.LocationCard

+

位置卡片消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
latitudedouble

纬度

longitudedouble

经度

titlestring

标题

addressstring

描述

+ + + + + +

LaanaMessage.MarketFace

+

来自 QQ 表情市场的表情消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
facePackageIduint32

表情包 ID

faceIdstring

表情 ID

faceKeystring

表情的 key

displayTextstring

发送表情时的文字描述,默认为 [动画表情]

+ + + + + +

LaanaMessage.MusicCard

+

音乐卡片消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
sourceLaanaMessage.MusicCard.Source

音乐来源

idstring

音乐 ID

+ + + + + +

LaanaMessage.NormalFile

+

普通文件消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
fileLaanaFile

文件

namestring

文件名

sizeuint64

文件大小

+ + + + + +

LaanaMessage.SingleImage

+

单张图片消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
imageLaanaFile

图片

displayTextstring

发送图片时的文字描述,默认为 [图片]

+ + + + + +

LaanaMessage.UnknownMessage

+

未知消息,用于存储无法解析的消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
rawContentstring

Json 序列化的消息内容

typeIdentifierstringoptional

用于标识消息类型,以便识别这些标识符的客户端可以解析消息

+ + + + + +

LaanaMessage.Video

+

视频消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
videoLaanaFile

视频

durationuint32optional

视频时长,单位为秒,若不提供则由服务端解析

+ + + + + +

LaanaMessage.Voice

+

语音消息

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
voiceLaanaFile

语音

durationuint32

语音时长,单位为秒

+ + + + + +

LaanaMessage.XmlMessage

+

Xml 消息

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
xmlstring

Xml 内容

+ + + + + +

LaanaPeer

+

Laana Peer,可以是好友或群

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
typeLaanaPeer.Type

类型

uinstring

Uin 或群号

+ + + + + + + +

LaanaMessage.ContactCard.Type

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
BUDDY0

好友

GROUP1

+ +

LaanaMessage.MusicCard.Source

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
QQ_MUSIC0

QQ 音乐

NETEASE_MUSIC1

网易云音乐

CUSTOM2

自定义

+ +

LaanaPeer.Type

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
BUDDY0

好友

GROUP1

+ + + + + + + +
+

action/message_action.proto

Top +
+

+ + +

GetForwardedMessagesPing

+

获取转发消息 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
refIdstring

转发的消息的 msgSeq 列表

+ + + + + +

GetForwardedMessagesPong

+

获取转发消息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
forwardMessageLaanaMessage.ForwardedMessage

转发的消息

+ + + + + +

GetHistoryMessagesPing

+

获取历史消息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
peerLaanaPeer

消息来源

lastMsgSequint64

最近一条消息的 msgSeq

countuint32

获取的消息数量

+ + + + + +

GetHistoryMessagesPong

+

获取历史消息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
messagesLaanaMessagerepeated

获取的消息列表

+ + + + + +

GetMessagePing

+

获取消息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
msgSequint64

消息的 msgSeq

peerLaanaPeer

消息来源

+ + + + + +

GetMessagePong

+

获取消息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
messageLaanaMessage

获取的消息

+ + + + + +

GetMessagesPing

+

批量获取消息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
msgSeqsstringrepeated

消息的 msgSeq 列表

peerLaanaPeer

消息来源

+ + + + + +

GetMessagesPong

+

批量获取消息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
messagesLaanaMessagerepeated

获取的消息列表

+ + + + + +

LaanaOutgoingMessage

+

将要发送的消息,不包含 msgSeq 等元数据

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
bubbleLaanaMessage.Bubble

fileLaanaMessage.NormalFile

singleImageLaanaMessage.SingleImage

marketFaceLaanaMessage.MarketFace

videoLaanaFile

voiceLaanaFile

linkCardLaanaMessage.LinkCard

contactCardLaanaMessage.ContactCard

musicCardLaanaMessage.MusicCard

locationCardLaanaMessage.LocationCard

forwardedMessageLaanaOutgoingMessage.ConstructedForwardedMessage

xmlMessageLaanaMessage.XmlMessage

arkMessageLaanaMessage.ArkMessage

+ + + + + +

LaanaOutgoingMessage.ConstructedForwardedMessage

+

构造(伪造)的转发消息

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
nodesLaanaOutgoingMessage.ConstructedForwardedMessage.Noderepeated

转发的消息节点

+ + + + + +

LaanaOutgoingMessage.ConstructedForwardedMessage.Node

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
senderUinstring

发送者 Uin

senderNamestring

显示的发送者名称

messageLaanaOutgoingMessage

消息内容

+ + + + + +

MarkPeerMessageAsReadPing

+

将消息标为已读 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
peerLaanaPeer

消息来源

+ + + + + +

SendMessagePing

+

发送消息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
targetPeerLaanaPeer

目标

messageLaanaOutgoingMessage

消息

+ + + + + +

SendMessagePong

+

发送消息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
msgSequint64

发送的消息对应的 msgSeq

+ + + + + +

WithdrawMessagePing

+

撤回消息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
msgSequint64

消息的 msgSeq

peerLaanaPeer

消息来源

+ + + + + + + + + + + + + +
+

entity/user.proto

Top +
+

+ + +

LaanaUserEntity

+

Laana 用户

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
uinstring

Uin

nickstring

昵称

sexLaanaUserEntity.Sex

性别

ageuint32optional

年龄

qidstringoptional

QID,用于辨别用户的另一种方式

buddyRoleDataLaanaUserEntity.BuddyRoleData

如果是作为好友被查询,则返回此数据

groupRoleDataLaanaUserEntity.GroupRoleData

如果是作为群成员被查询,则返回此数据

+ + + + + +

LaanaUserEntity.BuddyRoleData

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
remarkstringoptional

好友备注

+ + + + + +

LaanaUserEntity.GroupRoleData

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
permissionLevelLaanaUserEntity.GroupRoleData.PermissionLevel

权限等级

groupNickstringoptional

群昵称

joinTimeuint64optional

加群时间

lastSpeakTimeuint64

最后发言时间

shutUpTimeuint64

禁言时间

isRobotbool

是否为机器人

+ + + + + + + +

LaanaUserEntity.GroupRoleData.PermissionLevel

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
FALLBACK0

NORMAL2

普通成员

ADMIN3

管理员

OWNER4

群主

+ +

LaanaUserEntity.Sex

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
UNKNOWN0

未知 / 其他

MALE1

FEMALE2

+ + + + + + + +
+

entity/group.proto

Top +
+

+ + +

LaanaGroup

+

Laana 群

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

groupNamestring

群名称

memberCountuint32

群人数

maxMemberCountuint32

群容量

groupRemarkstringoptional

群备注,类似好友备注

+ + + + + + + + + + + + + +
+

action/contact_action.proto

Top +
+

+ + +

GetAllBuddiesPing

+

获取所有好友 - 请求

+ + + + + +

GetAllBuddiesPong

+

获取所有好友 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyUinsstringrepeated

好友 Uin 列表

+ + + + + +

GetAllGroupsPing

+

获取所有群组 - 请求

+ + + + + +

GetAllGroupsPong

+

获取所有群组 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodesstringrepeated

群号列表

+ + + + + +

GetBuddyInfoPing

+

获取好友信息 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyUinstring

好友 Uin

+ + + + + +

GetBuddyInfoPong

+

获取好友信息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyLaanaUserEntity

好友信息

+ + + + + +

GetGroupInfoPing

+

获取群组信息 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

+ + + + + +

GetGroupInfoPong

+

获取群组信息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupLaanaGroup

群组信息

+ + + + + + + + + + + + + +
+

action/group_action.proto

Top +
+

+ + +

GetAllGroupMembersInfoPing

+

获取所有群成员信息 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

+ + + + + +

GetAllGroupMembersInfoPong

+

获取所有群成员信息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
membersLaanaUserEntityrepeated

群成员信息列表

+ + + + + +

GetGroupMemberInfoPing

+

获取群成员信息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

+ + + + + +

GetGroupMemberInfoPong

+

获取群成员信息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
memberLaanaUserEntity

群成员信息

+ + + + + +

GetGroupMemberUinsPing

+

获取所有群成员 Uin - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

+ + + + + +

GetGroupMemberUinsPong

+

获取所有群成员 Uin - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
memberUinsstringrepeated

群成员 Uin 列表

+ + + + + +

KickGroupMemberPing

+

踢出群成员 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

+ + + + + +

QuitGroupPing

+

退出群 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

+ + + + + +

SetGroupAdminPing

+

设置群管理员 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

operationSetGroupAdminPing.Operation

操作,设置或取消

+ + + + + +

SetGroupAvatarPing

+

设置群头像 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

avatarLaanaFile

群头像

+ + + + + +

SetGroupAvatarPong

+

获取群成员信息 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
avatarCacheIdstring

头像的缓存 ID

+ + + + + +

SetGroupMemberCardPing

+

设置群成员名片 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

cardstring

名片

+ + + + + +

SetGroupMemberShutUpPing

+

设置群成员禁言 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

durationuint32

表示禁言,duration 为禁言时长,单位为秒

liftbool

表示解禁

+ + + + + +

SetGroupMemberSpecialTitlePing

+

设置群成员专属头衔 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

memberUinstring

群成员 Uin

titlestring

专属头衔

+ + + + + +

SetGroupNamePing

+

获取群成员信息 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

namestring

群名称

+ + + + + +

SetGroupShutUpAllPing

+

设置全员禁言 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

operationSetGroupShutUpAllPing.Operation

操作,全员禁言或解除全员禁言

+ + + + + + + +

SetGroupAdminPing.Operation

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
SET0

设置

UNSET1

取消

+ +

SetGroupShutUpAllPing.Operation

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
SHUT_UP0

全员禁言

LIFT1

解除全员禁言

+ + + + + + + +
+

event/request_event.proto

Top +
+

+ + +

LaanaSelfInvitedToGroupEvent

+

有人邀请 Bot 加入群组事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
invitationIdstring

请求 ID

groupCodestring

群号

invitorUinstring

邀请者 Uin

wordsstringoptional

邀请时的附言

+ + + + + +

LaanaSomeoneRequestToAddBuddyEvent

+

有人请求添加好友事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyRequestIdstring

请求 ID

requesterUinstring

请求者 Uin

wordsstringoptional

请求时的附言

+ + + + + +

LaanaSomeoneRequestToJoinGroupEvent

+

有人请求加入群组事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
joinRequestIdstring

请求 ID

groupCodestring

群号

requesterUinstring

请求者 Uin

invitorUinstringoptional

邀请者 Uin

wordsstringoptional

请求时的附言

+ + + + + + + +

LaanaSelfInvitedToGroupEvent.State

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
PENDING_AT_INVITEE0

需要邀请者同意

PENDING_AT_ADMIN1

邀请者已同意,等待管理员审批

SUCCEEDED2

邀请成功

+ + + + + + + +
+

action/request_action.proto

Top +
+

+ + +

HandleBuddyAddRequestPing

+

处理好友添加请求 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyRequestIdstring

请求 ID

operationHandleBuddyAddRequestPing.Operation

操作

rejectionWordsstringoptional

拒绝理由

+ + + + + +

HandleGroupInvitationPing

+

处理群组邀请 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
invitationIdstring

邀请 ID

operationHandleGroupInvitationPing.Operation

操作

+ + + + + +

HandleGroupInvitationPong

+

处理群组邀请 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
nextStateLaanaSelfInvitedToGroupEvent.State

处理该邀请后,下一步的状态

+ + + + + +

HandleGroupJoinRequestPing

+

处理群组加入请求 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
joinRequestIdstring

请求 ID

operationHandleGroupJoinRequestPing.Operation

操作

rejectionWordsstringoptional

拒绝理由

+ + + + + + + +

HandleBuddyAddRequestPing.Operation

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
ACCEPT0

接受

REJECT1

拒绝

IGNORE2

忽略

+ +

HandleGroupInvitationPing.Operation

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
ACCEPT0

接受

REJECT1

拒绝

IGNORE2

忽略

+ +

HandleGroupJoinRequestPing.Operation

+

操作

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
ACCEPT0

接受

REJECT1

拒绝

IGNORE2

忽略

+ + + + + + + +
+

action/file_action.proto

Top +
+

+ + +

CreateGroupFolderPing

+

创建群文件夹 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

namestring

文件夹名

+ + + + + +

CreateGroupFolderPong

+

创建群文件夹 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
folderIdstring

文件夹 ID

+ + + + + +

DeleteGroupFilePing

+

删除群文件 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

cacheIdstring

缓存 ID

+ + + + + +

DeleteGroupFolderPing

+

删除群文件夹 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

folderIdstring

文件夹 ID

+ + + + + +

DestroyCachePing

+

销毁缓存 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID

+ + + + + +

GetFileDataPing

+

获取文件数据 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID

+ + + + + +

GetFileDataPong

+

获取文件数据 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
databytes

字节数据

+ + + + + +

GetGroupFileListPing

+

获取群文件列表 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

folderIdstringoptional

文件夹 ID,默认为根目录

+ + + + + +

GetGroupFileListPong

+

获取群文件列表 - 响应

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
filesGroupFilerepeated

文件列表

foldersGroupFolderrepeated

文件夹列表

+ + + + + +

PrepareCacheByUrlPing

+

获取缓存 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
urlstring

URL

methodPrepareCacheByUrlPing.Methodoptional

请求的 Method,默认为 GET

headersPrepareCacheByUrlPing.HeadersEntryrepeated

请求头

+ + + + + +

PrepareCacheByUrlPing.HeadersEntry

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keystring

valuestring

+ + + + + +

PrepareCacheByUrlPong

+

获取缓存 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID

+ + + + + +

UploadCachePing

+

上传缓存 - 请求

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
databytes

数据

+ + + + + +

UploadCachePong

+

上传缓存 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID

+ + + + + +

UploadGroupFilePing

+

上传群文件 - 请求

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

fileLaanaFile

文件

folderIdstringoptional

文件夹 ID,默认为根目录

+ + + + + +

UploadGroupFilePong

+

上传群文件 - 响应

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
cacheIdstring

缓存 ID

+ + + + + + + +

PrepareCacheByUrlPing.Method

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
GET0

POST1

PUT2

DELETE3

+ + + + + + + +
+

action/action_wrapper.proto

Top +
+

+ + +

ExtendedActionPing

+

扩展动作的请求数据

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
actionNamestring

动作名称

actionDatabytes

动作数据

+ + + + + +

ExtendedActionPong

+

扩展动作的响应数据

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
actionNamestring

动作名称

pongDatabytes

动作数据

+ + + + + +

FailedPong

+

如果请求失败,则返回此消息

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
reasonstring

+ + + + + +

GeneralSuccessPong

+

如果请求成功,且 API 本身不需要返回数据,则返回此消息

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
successbool

+ + + + + +

LaanaActionPing

+

所有 API 请求的包装器

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
clientPingSequint64

客户端请求的序列号,用于区分不同的请求

sendMessageSendMessagePing

getMessageGetMessagePing

getMessagesGetMessagesPing

getHistoryMessagesGetHistoryMessagesPing

withdrawMessageWithdrawMessagePing

markPeerMessageAsReadMarkPeerMessageAsReadPing

getForwardedMessagesGetForwardedMessagesPing

getAllBuddiesGetAllBuddiesPing

getAllGroupsGetAllGroupsPing

getBuddyInfoGetBuddyInfoPing

getGroupInfoGetGroupInfoPing

getGroupMemberUinsGetGroupMemberUinsPing

getGroupMemberInfoGetGroupMemberInfoPing

getAllGroupMembersInfoGetAllGroupMembersInfoPing

setGroupNameSetGroupNamePing

setGroupAvatarSetGroupAvatarPing

setGroupAdminSetGroupAdminPing

setGroupMemberCardSetGroupMemberCardPing

setGroupMemberSpecialTitleSetGroupMemberSpecialTitlePing

setGroupMemberShutUpSetGroupMemberShutUpPing

setGroupShutUpAllSetGroupShutUpAllPing

kickGroupMemberKickGroupMemberPing

quitGroupQuitGroupPing

handleBuddyAddRequestHandleBuddyAddRequestPing

handleGroupJoinRequestHandleGroupJoinRequestPing

handleGroupInvitationHandleGroupInvitationPing

uploadCacheUploadCachePing

prepareCacheByUrlPrepareCacheByUrlPing

destroyCacheDestroyCachePing

getFileDataGetFileDataPing

getGroupFileListGetGroupFileListPing

uploadGroupFileUploadGroupFilePing

createGroupFolderCreateGroupFolderPing

deleteGroupFileDeleteGroupFilePing

deleteGroupFolderDeleteGroupFolderPing

extendedActionExtendedActionPing

扩展动作

+ + + + + +

LaanaActionPong

+

所有 API 响应数据的包装器

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
clientPingSequint64

对应请求的客户端请求序列号

failedFailedPong

sendMessageSendMessagePong

getMessageGetMessagePong

getMessagesGetMessagesPong

getHistoryMessagesGetHistoryMessagesPong

withdrawMessageGeneralSuccessPong

markPeerMessageAsReadGeneralSuccessPong

getForwardedMessagesGetForwardedMessagesPong

getAllBuddiesGetAllBuddiesPong

getAllGroupsGetAllGroupsPong

getBuddyInfoGetBuddyInfoPong

getGroupInfoGetGroupInfoPong

getGroupMemberUinsGetGroupMemberUinsPong

getGroupMemberInfoGetGroupMemberInfoPong

getAllGroupMembersInfoGetAllGroupMembersInfoPong

setGroupNameGeneralSuccessPong

setGroupAvatarSetGroupAvatarPong

setGroupAdminGeneralSuccessPong

setGroupMemberCardGeneralSuccessPong

setGroupMemberSpecialTitleGeneralSuccessPong

setGroupMemberShutUpGeneralSuccessPong

setGroupShutUpAllGeneralSuccessPong

kickGroupMemberGeneralSuccessPong

quitGroupGeneralSuccessPong

handleBuddyAddRequestGeneralSuccessPong

handleGroupJoinRequestGeneralSuccessPong

handleGroupInvitationHandleGroupInvitationPong

uploadCacheUploadCachePong

prepareCacheByUrlPrepareCacheByUrlPong

destroyCacheGeneralSuccessPong

getFileDataGetFileDataPong

getGroupFileListGetGroupFileListPong

uploadGroupFileUploadGroupFilePong

createGroupFolderCreateGroupFolderPong

deleteGroupFileGeneralSuccessPong

deleteGroupFolderGeneralSuccessPong

extendedActionExtendedActionPong

扩展动作

+ + + + + + + + + + + + + +
+

event/buddy_event.proto

Top +
+

+ + +

LaanaBuddyAddedEvent

+

好友添加事件

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyUinstring

好友 Uin

+ + + + + +

LaanaBuddyMessageWithdrawalEvent

+

好友撤回消息事件

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
buddyUinstring

好友 Uin

msgSeqstring

消息序列号

+ + + + + + + + + + + + + +
+

event/meta_event.proto

Top +
+

+ + +

LaanaBotOfflineEvent

+

机器人下线事件

+ + + + + +

LaanaBotOnlineEvent

+

机器人上线事件

+ + + + + + + + + + + + + +
+

event/group_event.proto

Top +
+

+ + +

LaanaGroupAdminChangeEvent

+

群管理员变更事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

targetUinstring

变更的群成员 Uin

operationLaanaGroupAdminChangeEvent.Operation

操作

+ + + + + +

LaanaGroupEmojiLikeEvent

+

群消息点赞事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

msgSequint64

消息序列号

emojiIdstring

表情 ID

operationLaanaGroupEmojiLikeEvent.Operation

操作

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupEssenceMessageEvent

+

设置群精华消息事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

msgSequint64

消息序列号

operationLaanaGroupEssenceMessageEvent.Operation

操作

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupLiftShutUpAllEvent

+

群全体禁言解除事件

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupLiftShutUpMemberEvent

+

群成员被解禁事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

targetUinstring

被解禁的群成员 Uin

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupMemberCardChangeEvent

+

群成员名片变更事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

targetUinstring

变更的群成员 Uin

newCardstring

新名片

+ + + + + +

LaanaGroupMemberDecreaseEvent

+

群成员减少事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

oldMemberUinstring

旧成员 Uin

operatorUinstringoptional

操作者 Uin(若有)

+ + + + + +

LaanaGroupMemberIncreaseEvent

+

群成员增加事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

newMemberUinstring

新成员 Uin

operatorUinstringoptional

操作者 Uin(若有)

invitorUinstringoptional

邀请者 Uin(若有)

+ + + + + +

LaanaGroupMemberTitleChangeEvent

+

群成员专属头衔变更事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

targetUinstring

变更的群成员 Uin

newTitlestring

新专属头衔

+ + + + + +

LaanaGroupMessageWithdrawalEvent

+

群消息撤回事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

msgSequint64

撤回的消息序列号

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupShutUpAllEvent

+

群被全员禁言事件

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

operatorUinstring

操作者 Uin

+ + + + + +

LaanaGroupShutUpMemberEvent

+

群成员被禁言事件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
groupCodestring

群号

targetUinstring

被禁言的群成员 Uin

durationuint32

禁言时长,单位为秒

operatorUinstring

操作者 Uin

+ + + + + + + +

LaanaGroupAdminChangeEvent.Operation

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
SET0

设置

UNSET1

取消

+ +

LaanaGroupEmojiLikeEvent.Operation

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
LIKE0

点赞

DISLIKE1

取消点赞

+ +

LaanaGroupEssenceMessageEvent.Operation

+

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
SET0

设置

UNSET1

取消

+ + + + + + + +
+

event/event_wrapper.proto

Top +
+

+ + +

LaanaEventWrapper

+

所有事件的包装器

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
eventIdstring

事件 ID

timeuint64

时间戳

botUinstring

接收事件的机器人 Uin

buddyAddedEventLaanaBuddyAddedEvent

buddyMessageWithdrawEventLaanaBuddyMessageWithdrawalEvent

groupAdminChangeEventLaanaGroupAdminChangeEvent

groupEssenceMessageEventLaanaGroupEssenceMessageEvent

groupMemberCardChangeEventLaanaGroupMemberCardChangeEvent

groupMemberIncreaseEventLaanaGroupMemberIncreaseEvent

groupMemberDecreaseEventLaanaGroupMemberDecreaseEvent

groupMemberTitleChangeEventLaanaGroupMemberTitleChangeEvent

groupMessageWithdrawEventLaanaGroupMessageWithdrawalEvent

groupMuteMemberEventLaanaGroupShutUpMemberEvent

groupMuteAllEventLaanaGroupShutUpAllEvent

groupUnmuteMemberEventLaanaGroupLiftShutUpMemberEvent

groupUnmuteAllEventLaanaGroupLiftShutUpAllEvent

groupEmojiLikeEventLaanaGroupEmojiLikeEvent

someoneRequestToAddBuddyEventLaanaSomeoneRequestToAddBuddyEvent

someoneRequestToJoinGroupEventLaanaSomeoneRequestToJoinGroupEvent

selfInvitedToGroupEventLaanaSelfInvitedToGroupEvent

botOnlineEventLaanaBotOnlineEvent

botOfflineEventLaanaBotOfflineEvent

extendedEventLaanaExtendedEvent

扩展事件

+ + + + + +

LaanaExtendedEvent

+

扩展事件

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
eventNamestring

事件名称

eventDatabytes

事件数据

+ + + + + + + + + + + + + +
+

laana.proto

Top +
+

+ + +

LaanaClientSideHandshake

+

客户端的握手消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
clientVersionstring

客户端的 Laana 协议版本

clientNamestring

客户端的名称,例如 NoneBot2,用于区分不同的实现

tokenstringoptional

客户端的 token,用于验证客户端的身份

extendedHandshakeDatabytesoptional

握手时的附加数据

+ + + + + +

LaanaDataWrapper

+

所有类型消息的包装器

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
actionPingLaanaActionPing

调用 API 的请求

actionPongLaanaActionPong

API 的响应

eventLaanaEventWrapper

事件

messageLaanaMessage

消息

clientSideHandshakeLaanaClientSideHandshake

客户端的握手请求

serverSideHandshakeLaanaServerSideHandshake

服务端的握手响应

extendedDataLaanaExtendedData

未声明的扩展数据

+ + + + + +

LaanaExtendedData

+

扩展数据的包装器

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keystring

用于区分扩展数据类型

valuebytes

扩展数据

+ + + + + +

LaanaServerSideHandshake

+

客户端和服务端的握手消息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
serverVersionstring

服务端的 Laana 协议版本

resultLaanaServerSideHandshake.Result

握手结果

serverNamestring

服务端的名称,例如 Lagrange.Core,用于区分不同的实现

extendedHandshakeDatabytesoptional

握手时的附加数据

+ + + + + + + +

LaanaServerSideHandshake.Result

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
SUCCESS0

握手成功

FAILURE_WRONG_TOKEN1

握手失败,原因:错误的 token

FAILURE_LAANA_VERSION_MISMATCH2

握手失败,原因:版本不匹配

+ + + + + + + +

Scalar Value Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)
+ + +