mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +08:00
Add a configuration logPreviousMessages
This commit is contained in:
parent
f4f7e5f63c
commit
401634eb24
@ -226,7 +226,9 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
|
||||
return
|
||||
|
||||
if (!packet::class.annotations.filterIsInstance<NoLog>().any()) {
|
||||
bot.logger.verbose("Packet received: $packet")
|
||||
if ((packet as? BroadcastControllable)?.shouldBroadcast != false) {
|
||||
bot.logger.verbose("Packet received: $packet")
|
||||
}
|
||||
}
|
||||
|
||||
when (packet) {
|
||||
|
@ -62,6 +62,12 @@ class BotConfiguration : CoroutineContext.Element {
|
||||
* 验证码处理器
|
||||
*/
|
||||
var captchaSolver: CaptchaSolver = DefaultCaptchaSolver
|
||||
/**
|
||||
* 登录完成后几秒会收到好友消息的历史记录,
|
||||
* 这些历史记录不会触发事件.
|
||||
* 这个选项为是否把这些记录添加到日志
|
||||
*/
|
||||
var logPreviousMessages: Boolean = false
|
||||
|
||||
companion object Key : CoroutineContext.Key<BotConfiguration> {
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user