Package-level declarations

Types

Link copied to clipboard
open class MessageReceipt<out C : Contact> @MiraiInternalApi constructor(val source: OnlineMessageSource.Outgoing, val target: C)

发送消息后得到的回执. 可用于撤回, 引用回复等.

Link copied to clipboard

消息序列化器.

Functions

Link copied to clipboard
Link copied to clipboard
inline suspend fun <P : MessageEvent> P.nextMessage(timeoutMillis: Long = -1, priority: EventPriority = EventPriority.MONITOR, noinline filter: suspend P.(P) -> Boolean = { true }): MessageChain

挂起当前协程, 等待下一条语境与 this 相同且通过 筛选MessageEvent. 有关语境的定义可查看 isContextIdenticalWith.

inline suspend fun <P : MessageEvent> P.nextMessage(timeoutMillis: Long = -1, priority: EventPriority = EventPriority.HIGH, intercept: Boolean = false, noinline filter: suspend P.(P) -> Boolean = { true }): MessageChain

挂起当前协程, 等待下一条语境与 this 相同且通过 筛选MessageEvent, 并且拦截该事件. 有关语境的定义可查看 isContextIdenticalWith. 有关拦截的说明可查看 Event.intercept.

Link copied to clipboard
inline fun <P : MessageEvent> P.nextMessageAsync(timeoutMillis: Long = -1, coroutineContext: CoroutineContext = EmptyCoroutineContext, priority: EventPriority = EventPriority.MONITOR, noinline filter: suspend P.(P) -> Boolean = { true }): Deferred<MessageChain>

nextMessage 的异步版本.

Link copied to clipboard
inline suspend fun <P : MessageEvent> P.nextMessageOrNull(timeoutMillis: Long, priority: EventPriority = EventPriority.MONITOR, noinline filter: suspend P.(P) -> Boolean = { true }): MessageChain?

挂起当前协程, 等待下一条 MessageEvent.senderMessageEvent.subjectthis 相同且通过 筛选MessageEvent

Link copied to clipboard
inline fun <P : MessageEvent> P.nextMessageOrNullAsync(timeoutMillis: Long, coroutineContext: CoroutineContext = EmptyCoroutineContext, priority: EventPriority = EventPriority.MONITOR, noinline filter: suspend P.(P) -> Boolean = { true }): Deferred<MessageChain?>

nextMessageOrNull 的异步版本.

Properties

Link copied to clipboard

获取相关 Bot

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard