Commit d63e3678 authored by Him188's avatar Him188

Fix warnings

parent f9b340fa
......@@ -9,9 +9,7 @@ import net.mamoe.mirai.Bot
import net.mamoe.mirai.network.BotNetworkHandler
import net.mamoe.mirai.network.BotSession
import net.mamoe.mirai.network.protocol.tim.TIMProtocol
import net.mamoe.mirai.network.protocol.tim.handler.ActionPacketHandler
import net.mamoe.mirai.network.protocol.tim.handler.DataPacketSocketAdapter
import net.mamoe.mirai.network.protocol.tim.handler.PacketHandler
import net.mamoe.mirai.network.protocol.tim.handler.TemporaryPacketHandler
import net.mamoe.mirai.network.protocol.tim.packet.*
import net.mamoe.mirai.network.protocol.tim.packet.login.CaptchaKey
......@@ -312,11 +310,7 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
}
override val bot: Bot = Bot(qq, "")
val session = BotSession(bot, sessionKey, socket, this)
val action = ActionPacketHandler(session)
@Suppress("UNCHECKED_CAST")
override fun <T : PacketHandler> get(key: PacketHandler.Key<T>): T = action as? T ?: error("UNSUPPORTED")
override val session = BotSession(bot, sessionKey, socket, this)
override suspend fun login(configuration: BotConfiguration): LoginResult = LoginResult.SUCCESS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment