LowLevelApiAccessor

IMirai 协议层低级 API.

警告: 所有的低级 API 都可能在任意时刻不经过任何警告和迭代就被修改. 因此非常不建议在任何情况下使用这些 API.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun getGroupVoiceDownloadUrl(bot: Bot, md5: ByteArray, groupId: Long, dstUin: Long): String

查询语音的下载连接

Link copied to clipboard
abstract suspend fun getRawGroupList(bot: Bot): Sequence<Long>

向服务器查询群列表. 返回值高 32 bits 为 uin, 低 32 bits 为 groupCode

Link copied to clipboard
abstract suspend fun getRawGroupMemberList(bot: Bot, groupUin: Long, groupCode: Long, ownerId: Long): Sequence<MemberInfo>

向服务器查询群成员列表. 请优先使用 Bot.getGroup, Group.members 查看群成员.

Link copied to clipboard
abstract suspend fun muteAnonymousMember(bot: Bot, anonymousId: String, anonymousNick: String, groupId: Long, seconds: Int)

禁言一个匿名用户

Link copied to clipboard
abstract fun newFriend(bot: Bot, friendInfo: FriendInfo): Friend

构造一个 Friend 对象.

Link copied to clipboard
abstract fun newStranger(bot: Bot, strangerInfo: StrangerInfo): Stranger

构造一个 Stranger 对象.

Link copied to clipboard
abstract suspend fun recallFriendMessageRaw(bot: Bot, targetId: Long, messageIds: IntArray, messageInternalIds: IntArray, time: Int): Boolean

撤回这条消息. 不会广播事件, 不会有安全性检查.

Link copied to clipboard
abstract suspend fun recallGroupMessageRaw(bot: Bot, groupCode: Long, messageIds: IntArray, messageInternalIds: IntArray): Boolean

撤回这条消息. 不会广播事件, 不会有安全性检查.

Link copied to clipboard
abstract suspend fun recallGroupTempMessageRaw(bot: Bot, groupUin: Long, targetId: Long, messageIds: IntArray, messageInternalIds: IntArray, time: Int): Boolean

撤回这条消息. 不会广播事件, 不会有安全性检查.

Link copied to clipboard
abstract suspend fun refreshKeys(bot: Bot)

主动刷新 keys, 如 SKey, PSKey 等.

Link copied to clipboard
abstract suspend fun solveBotInvitedJoinGroupRequestEvent(bot: Bot, eventId: Long, invitorId: Long, groupId: Long, accept: Boolean)

处理被邀请加入一个群请求事件

Link copied to clipboard
abstract suspend fun solveMemberJoinRequestEvent(bot: Bot, eventId: Long, fromId: Long, fromNick: String, groupId: Long, accept: Boolean?, blackList: Boolean, message: String = "")

处理账号请求加入群事件

Link copied to clipboard
abstract suspend fun solveNewFriendRequestEvent(bot: Bot, eventId: Long, fromId: Long, fromNick: String, accept: Boolean, blackList: Boolean)

处理一个账号请求添加机器人为好友的事件