BotConfiguration |
Bot 配置 open class BotConfiguration |
Context |
On Android, typealias to abstract class Context |
ContextImpl |
open class ContextImpl : Context |
DefaultLoginSolver |
自动选择 SwingSolver 或 StandardCharImageLoginSolver class DefaultLoginSolver : LoginSolver |
DeviceInfo |
设备信息. 可通过继承 SystemDeviceInfo 来在默认的基础上修改 abstract class DeviceInfo |
DeviceInfoData |
class DeviceInfoData : DeviceInfo |
ExternalImage |
外部图片. 图片数据还没有读取到内存. class ExternalImage |
LockFreeLinkedList |
Implementation of lock-free LinkedList. open class LockFreeLinkedList<E> |
LockFreeLinkedListNode |
open class LockFreeLinkedListNode<E> |
LoginSolver |
验证码, 设备锁解决器 abstract class LoginSolver |
MiraiLogger |
日志记录器. 所有的输出均依赖于它. 不同的对象可拥有只属于自己的 logger. 通过 identity 来区分. interface MiraiLogger |
MiraiLoggerPlatformBase |
日志基类. 实现了 follower 的调用传递. 若 Mirai 自带的日志系统无法满足需求, 请继承这个类并实现其抽象函数. abstract class MiraiLoggerPlatformBase : MiraiLogger |
MiraiLoggerWithSwitch |
带有开关的 Logger. 仅能通过 MiraiLogger.withSwitch 构造 class MiraiLoggerWithSwitch : MiraiLoggerPlatformBase |
PlatformLogger |
当前平台的默认的日志记录器.
在 JVM 控制台 端的实现为 println
在 Android 端的实现为 open class PlatformLogger : MiraiLoggerPlatformBase |
SilentLogger |
不做任何事情的 logger, keep silent. object SilentLogger : PlatformLogger |
SimpleLogger |
简易日志记录, 所有类型日志都会被重定向 logger class SimpleLogger : MiraiLoggerPlatformBase |
StandardCharImageLoginSolver |
使用字符图片展示验证码, 使用 input 获取输入, 使用 overrideLogger 输出 class StandardCharImageLoginSolver : LoginSolver |
SwingSolver |
object SwingSolver : LoginSolver |
SystemDeviceInfo |
通过本机信息来获取设备信息. open class SystemDeviceInfo : DeviceInfo |
UnsafeWeakRef |
WeakRef that class UnsafeWeakRef<T> |
MiraiExperimentalAPI |
标记这个类, 类型, 函数, 属性, 字段, 或构造器为实验性的 API. annotation class MiraiExperimentalAPI |
MiraiInternalAPI |
标记为一个仅供 Mirai 内部使用的 API. annotation class MiraiInternalAPI |
SinceMirai |
标记一个自 Mirai 某个版本起才支持或在这个版本修改过的 API. annotation class SinceMirai |
Throws |
This annotation indicates what exceptions should be declared by a function when compiled to a JVM method. annotation class Throws |
WeakRefProperty |
Indicates that the property is delegated by a WeakRef annotation class WeakRefProperty |
OverFileSizeMaxException |
图片文件过大 class OverFileSizeMaxException : IllegalStateException |
currentTimeMillis |
时间戳 val currentTimeMillis: Long |
currentTimeSeconds |
val currentTimeSeconds: Long |
DefaultLogger |
用于创建默认的日志记录器. 在一些需要使用日志的 Mirai 的组件, 如 Bot, 都会通过这个函数构造日志记录器. 可直接修改这个变量的值来重定向日志输出. var DefaultLogger: (identity: String?) -> MiraiLogger |
asSequence |
Builds a Sequence containing all the elements in this in the same order. fun <E> LockFreeLinkedList<E>.asSequence(): Sequence<E> |
debug |
fun MiraiLogger.debug(lazyMessage: () -> String?): Unit fun MiraiLogger.debug(lazyMessage: () -> String?, e: Throwable?): Unit |
error |
fun MiraiLogger.error(lazyMessage: () -> String?): Unit fun MiraiLogger.error(lazyMessage: () -> String?, e: Throwable?): Unit |
getValue |
Provides delegate value. operator fun <T> UnsafeWeakRef<T>.getValue(thisRef: Any?, property: KProperty<*>): T |
info |
fun MiraiLogger.info(lazyMessage: () -> String?): Unit fun MiraiLogger.info(lazyMessage: () -> String?, e: Throwable?): Unit |
isRemoved |
fun <E> LockFreeLinkedListNode<E>.isRemoved(): Boolean |
iterator |
operator fun <E> LockFreeLinkedList<E>.iterator(): Iterator<E> |
sendImage |
将图片作为单独的消息发送给 this suspend fun <C : Contact> C.sendImage(image: ExternalImage): MessageReceipt<C> |
sendTo |
将图片作为单独的消息发送给指定联系人 suspend fun <C : Contact> ExternalImage.sendTo(contact: C): MessageReceipt<C> |
toList |
Collect all the elements into a MutableList then cast it as a List fun <E> LockFreeLinkedList<E>.toList(): List<E> |
toMutableList |
Collect all the elements into a MutableList. fun <E> LockFreeLinkedList<E>.toMutableList(): MutableList<E> |
toMutableSet |
Collect all the elements into a MutableSet. fun <E> LockFreeLinkedList<E>.toMutableSet(): MutableSet<E> |
toSet |
Collect all the elements into a MutableSet then cast it as a Set fun <E> LockFreeLinkedList<E>.toSet(): Set<E> |
unsafeWeakRef |
Provides a weak reference to this.
The fun <T> T.unsafeWeakRef(): UnsafeWeakRef<T> |
upload |
上传图片并通过图片 ID 构造 Image 这个函数可能需消耗一段时间 suspend fun ExternalImage.upload(contact: Contact): OfflineImage |
verbose |
fun MiraiLogger.verbose(lazyMessage: () -> String): Unit fun MiraiLogger.verbose(lazyMessage: () -> String, e: Throwable?): Unit |
warning |
fun MiraiLogger.warning(lazyMessage: () -> String?): Unit fun MiraiLogger.warning(lazyMessage: () -> String?, e: Throwable?): Unit |
weakRef |
Provides a weak reference to this
The fun <T> T.weakRef(): WeakRef<T> |
withSwitch |
给这个 logger 添加一个开关, 用于控制是否记录 log fun MiraiLogger.withSwitch(default: Boolean = true): MiraiLoggerWithSwitch |