diff --git a/mirai-japt/src/main/java/net/mamoe/mirai/japt/BlockingContact.java b/mirai-japt/src/main/java/net/mamoe/mirai/japt/BlockingContact.java index 4ea7b98aa..b168c1948 100644 --- a/mirai-japt/src/main/java/net/mamoe/mirai/japt/BlockingContact.java +++ b/mirai-japt/src/main/java/net/mamoe/mirai/japt/BlockingContact.java @@ -1,6 +1,5 @@ package net.mamoe.mirai.japt; -import net.mamoe.mirai.Bot; import net.mamoe.mirai.message.data.Message; import net.mamoe.mirai.message.data.MessageChain; import org.jetbrains.annotations.NotNull; @@ -11,7 +10,7 @@ public interface BlockingContact { * 这个联系人所属 [Bot] */ @NotNull - Bot getBot(); + BlockingBot getBot(); /** * 可以是 QQ 号码或者群号码 [GroupId]. diff --git a/mirai-japt/src/main/kotlin/net/mamoe/mirai/japt/BlockingContactsImpl.kt b/mirai-japt/src/main/kotlin/net/mamoe/mirai/japt/BlockingContactsImpl.kt index b15929731..be13a9e68 100644 --- a/mirai-japt/src/main/kotlin/net/mamoe/mirai/japt/BlockingContactsImpl.kt +++ b/mirai-japt/src/main/kotlin/net/mamoe/mirai/japt/BlockingContactsImpl.kt @@ -3,7 +3,6 @@ package net.mamoe.mirai.japt import kotlinx.coroutines.runBlocking -import net.mamoe.mirai.Bot import net.mamoe.mirai.contact.Group import net.mamoe.mirai.contact.Member import net.mamoe.mirai.contact.MemberPermission @@ -20,7 +19,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.toList internal class BlockingQQImpl(private val delegate: QQ) : BlockingQQ { - override fun getBot(): Bot = delegate.bot + override fun getBot(): BlockingBot = delegate.bot.blocking() override fun getId(): Long = delegate.id override fun sendMessage(messages: MessageChain) = runBlocking { delegate.sendMessage(messages) } override fun sendMessage(message: String) = runBlocking { delegate.sendMessage(message.toMessage().toChain()) } @@ -41,7 +40,7 @@ internal class BlockingGroupImpl(private val delegate: Group) : BlockingGroup { override fun updateGroupInfo(): GroupInfo = runBlocking { delegate.updateGroupInfo() } override fun toFullString(): String = delegate.toFullString() override fun getMember(id: Long): BlockingMember = delegate.getMember(id).blocking() - override fun getBot(): Bot = delegate.bot + override fun getBot(): BlockingBot = delegate.bot.blocking() override fun getAnnouncement(): String = delegate.announcement @UseExperimental(MiraiInternalAPI::class) override fun getMembers(): Map = diff --git a/mirai-plugins/image-sender/build.gradle.kts b/mirai-plugins/image-sender/build.gradle.kts index a17f0fe44..706881a54 100644 --- a/mirai-plugins/image-sender/build.gradle.kts +++ b/mirai-plugins/image-sender/build.gradle.kts @@ -32,9 +32,6 @@ dependencies { api(project(":mirai-console")) runtimeOnly(files("../mirai-core/build/classes/kotlin/jvm/main")) // classpath is not added correctly by IDE - implementation(group = 'com.alibaba', name = 'fastjson', version = '1.2.62') - implementation("org.jsoup:jsoup:1.12.1") - api(kotlin("stdlib", kotlinVersion)) api(kotlinx("io-jvm", kotlinXIoVersion)) api(kotlinx("io", kotlinXIoVersion))