diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt index a68bcec24..1666d1d72 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt @@ -651,6 +651,9 @@ internal abstract class QQAndroidBotBase constructor( else -> error("unsupported image class: ${image::class.simpleName}") } + @Suppress("DeprecatedCallableAddReplaceWith") + @PlannedRemoval("1.0.0") + @Deprecated("use your own Http clients, this is going to be removed in 1.0.0", level = DeprecationLevel.WARNING) override suspend fun openChannel(image: Image): ByteReadChannel { return MiraiPlatformUtils.Http.get(queryImageUrl(image)).content.toKotlinByteReadChannel() } diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt index 1279a106b..9bc1ecee8 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt @@ -177,6 +177,9 @@ abstract class Bot : CoroutineScope, LowLevelBotAPIAccessor, BotJavaFriendlyAPI( * @see ByteReadChannel.copyAndClose * @see ByteReadChannel.copyTo */ + @PlannedRemoval("1.0.0") + @Deprecated("use your own Http clients, this is going to be removed in 1.0.0", level = DeprecationLevel.WARNING) + @MiraiExperimentalAPI @JvmSynthetic abstract suspend fun openChannel(image: Image): ByteReadChannel diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt index 51880fed7..b98b1ad0c 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/MessagePacket.kt @@ -195,6 +195,9 @@ abstract class MessagePacketBase : Pac * @see ByteReadChannel.copyAndClose * @see ByteReadChannel.copyTo */ + @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") + @PlannedRemoval("1.0.0") + @Deprecated("use your own Http clients, this is going to be removed in 1.0.0", level = DeprecationLevel.WARNING) suspend inline fun Image.channel(): ByteReadChannel = bot.openChannel(this) // endregion