Package-level declarations

QQ频道的事件相关内容,包括 事件订阅opcode 以及推送的各种事件消息体等。

Types

Link copied to clipboard
@SerialName(value = "AT_MESSAGE_CREATE")
data class AtMessageCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Message) : MessageDispatch
Link copied to clipboard
data class C2CManagementData(val timestamp: String, val openid: String)

C2CManagementDispatch 的事件数据

Link copied to clipboard

用户模块-用户管理相关事件。 data 类型为 C2CManagementData

Link copied to clipboard
@SerialName(value = "C2C_MESSAGE_CREATE")
data class C2CMessageCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: C2CMessageCreate.Data) : Signal.Dispatch
Link copied to clipboard
@SerialName(value = "C2C_MSG_RECEIVE")
data class C2CMsgReceive(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: C2CManagementData) : C2CManagementDispatch
Link copied to clipboard
@SerialName(value = "C2C_MSG_REJECT")
data class C2CMsgReject(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: C2CManagementData) : C2CManagementDispatch
Link copied to clipboard
@SerialName(value = "CHANNEL_CREATE")
data class ChannelCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventChannel) : ChannelDispatch

子频道事件 CHANNEL_CREATE

Link copied to clipboard
@SerialName(value = "CHANNEL_DELETE")
data class ChannelDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventChannel) : ChannelDispatch

子频道事件 CHANNEL_DELETE

Link copied to clipboard

channel相关的事件类型。data 类型为 EventChannel

Link copied to clipboard
@SerialName(value = "CHANNEL_UPDATE")
data class ChannelUpdate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventChannel) : ChannelDispatch

子频道事件 CHANNEL_UPDATE

Link copied to clipboard
@SerialName(value = "DIRECT_MESSAGE_CREATE")
data class DirectMessageCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Message) : MessageDispatch
Link copied to clipboard
data class EventChannel(val id: String, val guildId: String, val name: String, val type: ChannelType, val subType: ChannelSubType, val ownerId: String, val opUserId: String)

子频道事件 中接收到的 Channel 信息。

Link copied to clipboard
data class EventGuild(val id: String, val name: String, val icon: String, val ownerId: String, val isOwner: Boolean, val memberCount: Int, val maxMembers: Int, val description: String, val joinedAt: String, val opUserId: String) : Guild
Link copied to clipboard

Guild相关事件类型。data 类型为 EventGuild

Link copied to clipboard
sealed class EventIntents

各事件的 intents 和类型常量。

Link copied to clipboard
Link copied to clipboard
data class EventMember(val guildId: String, val user: User, val nick: String, val roles: List<String> = emptyList(), val opUserId: String, val joinedAt: String = ZERO_ISO_INSTANT) : MemberWithGuildId

频道成员事件体。

Link copied to clipboard
@SerialName(value = "FORUM_POST_CREATE")
data class ForumPostCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Post) : ForumPostDispatch

帖子创建事件

Link copied to clipboard
@SerialName(value = "FORUM_POST_DELETE")
data class ForumPostDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Post) : ForumPostDispatch

帖子删除事件

Link copied to clipboard

论坛事件:帖子事件

Link copied to clipboard
@SerialName(value = "FORUM_PUBLISH_AUDIT_RESULT")
data class ForumPublishAuditResult(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: AuditResult) : ForumDispatch

帖子审核事件

Link copied to clipboard
@SerialName(value = "FORUM_REPLY_CREATE")
data class ForumReplyCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Reply) : ForumReplyDispatch

回复创建事件

Link copied to clipboard
@SerialName(value = "FORUM_REPLY_DELETE")
data class ForumReplyDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Reply) : ForumReplyDispatch

回复删除事件

Link copied to clipboard

论坛事件:回复事件

Link copied to clipboard
@SerialName(value = "FORUM_THREAD_CREATE")
data class ForumThreadCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Thread) : ForumThreadDispatch

主题创建事件。

Link copied to clipboard
@SerialName(value = "FORUM_THREAD_DELETE")
data class ForumThreadDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Thread) : ForumThreadDispatch

主题删除事件。

Link copied to clipboard

论坛事件:主题事件

Link copied to clipboard
@SerialName(value = "FORUM_THREAD_UPDATE")
data class ForumThreadUpdate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Thread) : ForumThreadDispatch

主题更新事件。

Link copied to clipboard
@SerialName(value = "FRIEND_ADD")
data class FriendAdd(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: C2CManagementData) : C2CManagementDispatch
Link copied to clipboard
@SerialName(value = "FRIEND_DEL")
data class FriendDel(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: C2CManagementData) : C2CManagementDispatch
Link copied to clipboard
@SerialName(value = "GROUP_ADD_ROBOT")
data class GroupAddRobot(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: GroupRobotManagementData) : GroupRobotManagementDispatch
Link copied to clipboard
@SerialName(value = "GROUP_AT_MESSAGE_CREATE")
data class GroupAtMessageCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: GroupAtMessageCreate.Data) : Signal.Dispatch
Link copied to clipboard
@SerialName(value = "GROUP_DEL_ROBOT")
data class GroupDelRobot(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: GroupRobotManagementData) : GroupRobotManagementDispatch
Link copied to clipboard
@SerialName(value = "GROUP_MSG_RECEIVE")
data class GroupMsgReceive(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: GroupRobotManagementData) : GroupRobotManagementDispatch
Link copied to clipboard
@SerialName(value = "GROUP_MSG_REJECT")
data class GroupMsgReject(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: GroupRobotManagementData) : GroupRobotManagementDispatch
Link copied to clipboard
data class GroupRobotManagementData(val timestamp: String, val groupOpenid: String, val opMemberOpenid: String)
Link copied to clipboard

群聊模块-群管理相关事件。 data 类型为 GroupRobotManagementData

Link copied to clipboard
@SerialName(value = "GUILD_CREATE")
data class GuildCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventGuild) : EventGuildDispatch
Link copied to clipboard
@SerialName(value = "GUILD_DELETE")
data class GuildDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventGuild) : EventGuildDispatch
Link copied to clipboard
@SerialName(value = "GUILD_MEMBER_ADD")
data class GuildMemberAdd(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventMember) : Signal.Dispatch
Link copied to clipboard
@SerialName(value = "GUILD_MEMBER_REMOVE")
data class GuildMemberRemove(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventMember) : Signal.Dispatch
Link copied to clipboard
@SerialName(value = "GUILD_MEMBER_UPDATE")
data class GuildMemberUpdate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventMember) : Signal.Dispatch
Link copied to clipboard
@SerialName(value = "GUILD_UPDATE")
data class GuildUpdate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: EventGuild) : EventGuildDispatch
Link copied to clipboard
value class Intents(val value: Int)
Link copied to clipboard

MessageAudited 相关的事件类型。data 类型为 MessageAudited

Link copied to clipboard
@SerialName(value = "MESSAGE_AUDIT_PASS")
data class MessageAuditPass(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: MessageAudited) : MessageAuditedDispatch
Link copied to clipboard
@SerialName(value = "MESSAGE_AUDIT_REJECT")
data class MessageAuditReject(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: MessageAudited) : MessageAuditedDispatch
Link copied to clipboard
@SerialName(value = "MESSAGE_CREATE")
data class MessageCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Message) : MessageDispatch

发送消息事件,代表频道内的全部消息,而不只是 at 机器人的消息。内容与 AT_MESSAGE_CREATE 相同

Link copied to clipboard
@SerialName(value = "MESSAGE_DELETE")
data class MessageDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Unit) : Signal.Dispatch

删除(撤回)消息事件

Link copied to clipboard

message 相关的事件类型。data 类型为 Message

Link copied to clipboard
sealed class Opcode(val code: Int)

针对 Opcodes 中各 opcode 的实例类型。

Link copied to clipboard
object Opcodes

opcode 常量类。

Link copied to clipboard
Link copied to clipboard

开放论坛事件中三种类型事件内信息的统一抽象。

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_POST_CREATE")
data class OpenForumPostCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumPostData) : OpenForumPostDispatch

帖子事件:创建帖子(评论)

Link copied to clipboard
data class OpenForumPostData(val guildId: String, val channelId: String, val authorId: String) : OpenForumEventData

开放论坛事件中 帖子(评论)事件 的内容。

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_POST_DELETE")
data class OpenForumPostDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumPostData) : OpenForumPostDispatch

帖子事件:删除帖子(评论)

Link copied to clipboard

开放论坛事件的 帖子(评论)事件

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_REPLY_CREATE")
data class OpenForumReplyCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumReplyData) : OpenForumReplyDispatch

回复事件:创建回复

Link copied to clipboard
data class OpenForumReplyData(val guildId: String, val channelId: String, val authorId: String) : OpenForumEventData

开放论坛事件中 回复事件 的内容。

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_REPLY_DELETE")
data class OpenForumReplyDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumReplyData) : OpenForumReplyDispatch

回复事件:删除回复

Link copied to clipboard

开放论坛事件的 回复事件

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_THREAD_CREATE")
data class OpenForumThreadCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumThreadData) : OpenForumThreadDispatch

主题事件:创建主题

Link copied to clipboard
data class OpenForumThreadData(val guildId: String, val channelId: String, val authorId: String) : OpenForumEventData

开放论坛事件中 主题事件 的内容。

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_THREAD_DELETE")
data class OpenForumThreadDelete(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumThreadData) : OpenForumThreadDispatch

主题事件:删除主题

Link copied to clipboard

开放论坛事件的 主题事件

Link copied to clipboard
@SerialName(value = "OPEN_FORUM_THREAD_UPDATE")
data class OpenForumThreadUpdate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: OpenForumThreadData) : OpenForumThreadDispatch

主题事件:更新主题

Link copied to clipboard
@SerialName(value = "PUBLIC_MESSAGE_DELETE")
data class PublicMessageDeleteCreate(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Unit) : Signal.Dispatch

消息事件 PUBLIC_MESSAGE_DELETE_TYPE

Link copied to clipboard
@SerialName(value = "READY")
data class Ready(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: Ready.Data) : Signal.Dispatch

鉴权成功之后,后台会下发的 Ready Event.

Link copied to clipboard
sealed interface ReceiveAble

用于标记 Opcode 中对应的往来类型为可接收类型。

Link copied to clipboard
@SerialName(value = "RESUMED")
data class Resumed(val id: String? = null, val s: Long = DEFAULT_SEQ, val data: String) : Signal.Dispatch
Link copied to clipboard
sealed interface SendAble

用于标记 Opcode 中对应的往来类型为可发送类型。

Link copied to clipboard
data class Shard(val value: Int, val total: Int)
Link copied to clipboard
sealed class Signal<D>(val op: Opcode)

Properties

Link copied to clipboard

EventIntents 的所有实现类型的数组。

Functions

Link copied to clipboard

fun resolveDispatchSerializer(json: JsonObject, allowNameMissing: Boolean = false): KSerializer<out Signal.Dispatch>?

解析 json 并寻找匹配的 KSerializerSignal.Dispatch>, 如果找不到则得到 null

Inherited functions

Link copied to clipboard

获取当前json结构体中的 op 字段。

Link copied to clipboard
Link copied to clipboard