diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt index a4f42ddd4..0e6cf8f53 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt @@ -59,7 +59,6 @@ internal class QQImpl( override val nick: String get() = friendInfo.nick - @JvmName("sendMessageSuspend") @JvmSynthetic @Suppress("DuplicatedCode") override suspend fun sendMessage(message: Message): MessageReceipt { @@ -82,14 +81,12 @@ internal class QQImpl( return MessageReceipt(source, this, null) } - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) override suspend fun sendMessage(message: MessageChain): MessageReceipt { return this.sendMessage(message as Message) } - @JvmName("uploadImageSuspend") @JvmSynthetic @OptIn(MiraiInternalAPI::class) override suspend fun uploadImage(image: ExternalImage): OfflineFriendImage = try { @@ -222,7 +219,6 @@ internal class MemberImpl( @MiraiExperimentalAPI override suspend fun queryRemark(): FriendNameRemark = qq.queryRemark() - @JvmName("sendMessageSuspend") @JvmSynthetic @Suppress("DuplicatedCode") override suspend fun sendMessage(message: Message): MessageReceipt { @@ -245,14 +241,12 @@ internal class MemberImpl( return MessageReceipt(source, this, null) } - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) override suspend fun sendMessage(message: MessageChain): MessageReceipt { return this.sendMessage(message as Message) } - @JvmName("uploadImageSuspend") @JvmSynthetic override suspend fun uploadImage(image: ExternalImage): OfflineFriendImage = qq.uploadImage(image) // endregion @@ -317,7 +311,6 @@ internal class MemberImpl( override val bot: QQAndroidBot get() = qq.bot - @JvmName("muteSuspend") @JvmSynthetic override suspend fun mute(durationSeconds: Int) { if (group.botPermission != MemberPermission.OWNER && (!group.botPermission.isOperator() || this.isOperator())) { @@ -337,7 +330,6 @@ internal class MemberImpl( net.mamoe.mirai.event.events.MemberMuteEvent(this@MemberImpl, durationSeconds, null).broadcast() } - @JvmName("unmuteSuspend") @JvmSynthetic override suspend fun unmute() { if (group.botPermission != MemberPermission.OWNER && (!group.botPermission.isOperator() || this.isOperator())) { @@ -357,7 +349,6 @@ internal class MemberImpl( net.mamoe.mirai.event.events.MemberUnmuteEvent(this@MemberImpl, null).broadcast() } - @JvmName("kickSuspend") @JvmSynthetic override suspend fun kick(message: String) { if (group.botPermission != MemberPermission.OWNER && (!group.botPermission.isOperator() || this.isOperator())) { @@ -631,7 +622,6 @@ internal class GroupImpl( return members.delegate.filteringGetOrNull { it.id == id } } - @JvmName("sendMessageSuspend") @JvmSynthetic override suspend fun sendMessage(message: Message): MessageReceipt { check(!isBotMuted) { "bot is muted. Remaining seconds=$botMuteRemaining" } @@ -657,7 +647,6 @@ internal class GroupImpl( return MessageReceipt(source, this, botAsMember) } - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) override suspend fun sendMessage(message: MessageChain): MessageReceipt { @@ -665,7 +654,6 @@ internal class GroupImpl( } - @JvmName("uploadImageSuspend") @JvmSynthetic override suspend fun uploadImage(image: ExternalImage): OfflineGroupImage = try { if (BeforeImageUploadEvent(this, image).broadcast().isCancelled) { diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt index 7c832436e..e768f02aa 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt @@ -148,7 +148,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA /** * 挂起协程直到 [Bot] 下线. */ - @JvmName("joinSuspend") @JvmSynthetic actual suspend inline fun join() = network.join() @@ -162,7 +161,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * * @throws LoginFailedException */ - @JvmName("loginSuspend") @JvmSynthetic actual abstract suspend fun login() // endregion @@ -184,14 +182,12 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @see _lowLevelRecallFriendMessage 低级 API * @see _lowLevelRecallGroupMessage 低级 API */ - @JvmName("recallSuspend") @JvmSynthetic actual abstract suspend fun recall(source: MessageSource) /** * 获取图片下载链接 */ - @JvmName("queryImageUrlSuspend") @JvmSynthetic actual abstract suspend fun queryImageUrl(image: Image): String @@ -201,7 +197,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @see ByteReadChannel.copyAndClose * @see ByteReadChannel.copyTo */ - @JvmName("openChannelSuspend") @JvmSynthetic actual abstract suspend fun openChannel(image: Image): ByteReadChannel @@ -211,7 +206,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @param message 若需要验证请求时的验证消息. * @param remark 好友备注 */ - @JvmName("addFriendSuspend") @JvmSynthetic @MiraiExperimentalAPI("未支持") actual abstract suspend fun addFriend(id: Long, message: String?, remark: String?): AddFriendResult diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt index 7e5d298fb..3846d7c95 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt @@ -63,11 +63,9 @@ actual abstract class Contact : CoroutineScope, ContactJavaHappyAPI() { * * @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息. */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -81,7 +79,6 @@ actual abstract class Contact : CoroutineScope, ContactJavaHappyAPI() { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic actual abstract suspend fun uploadImage(image: ExternalImage): OfflineImage diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt index 95aa54121..fd19d53cd 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt @@ -178,11 +178,9 @@ actual abstract class Group : Contact(), CoroutineScope { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) @JvmSynthetic actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -196,7 +194,6 @@ actual abstract class Group : Contact(), CoroutineScope { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic actual abstract override suspend fun uploadImage(image: ExternalImage): OfflineGroupImage diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt index 18450d5e4..244d60d8a 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt @@ -90,7 +90,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberMuteEvent 成员被禁言事件 * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("muteSuspend") @JvmSynthetic actual abstract suspend fun mute(durationSeconds: Int) @@ -102,7 +101,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberUnmuteEvent 成员被取消禁言事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("unmuteSuspend") @JvmSynthetic actual abstract suspend fun unmute() @@ -117,11 +115,9 @@ actual abstract class Member : MemberJavaHappyAPI() { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -134,7 +130,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberLeaveEvent.Kick 成员被踢出事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("kickSuspend") @JvmSynthetic actual abstract suspend fun kick(message: String) diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt index 254747ac3..6579d9669 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt @@ -87,11 +87,9 @@ actual abstract class QQ : Contact(), CoroutineScope { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -105,7 +103,6 @@ actual abstract class QQ : Contact(), CoroutineScope { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic actual abstract override suspend fun uploadImage(image: ExternalImage): OfflineFriendImage } \ No newline at end of file diff --git a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt index 49755320a..eb9f59e2d 100644 --- a/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt +++ b/mirai-core/src/androidMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt @@ -115,7 +115,6 @@ actual open class MessageReceipt actual constructor( * 引用这条消息并回复. * @see MessageChain.quote 引用一条消息 */ - @JvmName("quoteReplySuspend") @JvmSynthetic actual suspend fun quoteReply(message: MessageChain) { target.sendMessage(this.quote() + message) 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 19c0c645f..a6b131f0b 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt @@ -27,7 +27,6 @@ import net.mamoe.mirai.network.LoginFailedException import net.mamoe.mirai.utils.* import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext -import kotlin.jvm.JvmName import kotlin.jvm.JvmStatic import kotlin.jvm.JvmSynthetic @@ -159,7 +158,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor { /** * 挂起协程直到 [Bot] 下线. */ - @JvmName("joinSuspend") @JvmSynthetic suspend inline fun join() @@ -174,7 +172,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor { * @throws LoginFailedException * @see alsoLogin */ - @JvmName("loginSuspend") @JvmSynthetic abstract suspend fun login() // endregion @@ -196,14 +193,12 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor { * @see _lowLevelRecallFriendMessage 低级 API * @see _lowLevelRecallGroupMessage 低级 API */ - @JvmName("recallSuspend") @JvmSynthetic abstract suspend fun recall(source: MessageSource) /** * 获取图片下载链接 */ - @JvmName("queryImageUrlSuspend") @JvmSynthetic abstract suspend fun queryImageUrl(image: Image): String @@ -213,7 +208,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor { * @see ByteReadChannel.copyAndClose * @see ByteReadChannel.copyTo */ - @JvmName("openChannelSuspend") @JvmSynthetic abstract suspend fun openChannel(image: Image): ByteReadChannel @@ -223,7 +217,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor { * @param message 若需要验证请求时的验证消息. * @param remark 好友备注 */ - @JvmName("addFriendSuspend") @JvmSynthetic @MiraiExperimentalAPI("未支持") abstract suspend fun addFriend(id: Long, message: String? = null, remark: String? = null): AddFriendResult diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt index c0126aad5..21b242a37 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt @@ -27,7 +27,6 @@ import net.mamoe.mirai.recallIn import net.mamoe.mirai.utils.* import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext -import kotlin.jvm.JvmName import kotlin.jvm.JvmSynthetic @@ -67,11 +66,9 @@ expect abstract class Contact() : CoroutineScope, ContactJavaHappyAPI { * * @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息. */ - @JvmName("sendMessageSuspend") @JvmSynthetic abstract suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) @JvmSynthetic abstract suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -85,7 +82,6 @@ expect abstract class Contact() : CoroutineScope, ContactJavaHappyAPI { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic abstract suspend fun uploadImage(image: ExternalImage): OfflineImage diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt index 826f0ff84..7eb8bcdb3 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt @@ -154,7 +154,6 @@ expect abstract class Group() : Contact, CoroutineScope { /** * 让机器人退出这个群. 机器人必须为非群主才能退出. 否则将会失败 */ - @JvmName("quitSuspend") @JvmSynthetic @MiraiExperimentalAPI("还未支持") abstract suspend fun quit(): Boolean @@ -179,11 +178,9 @@ expect abstract class Group() : Contact, CoroutineScope { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) @JvmSynthetic abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -197,7 +194,6 @@ expect abstract class Group() : Contact, CoroutineScope { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic abstract override suspend fun uploadImage(image: ExternalImage): OfflineGroupImage diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt index f633994df..33f9473eb 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt @@ -19,7 +19,6 @@ import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.MessageChain import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.WeakRefProperty -import kotlin.jvm.JvmName import kotlin.jvm.JvmSynthetic import kotlin.time.Duration import kotlin.time.ExperimentalTime @@ -96,7 +95,6 @@ expect abstract class Member() : MemberJavaHappyAPI { * @see MemberMuteEvent 成员被禁言事件 * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("muteSuspend") @JvmSynthetic abstract suspend fun mute(durationSeconds: Int) @@ -108,7 +106,6 @@ expect abstract class Member() : MemberJavaHappyAPI { * @see MemberUnmuteEvent 成员被取消禁言事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("unmuteSuspend") @JvmSynthetic abstract suspend fun unmute() @@ -120,7 +117,6 @@ expect abstract class Member() : MemberJavaHappyAPI { * @see MemberLeaveEvent.Kick 成员被踢出事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("kickSuspend") @JvmSynthetic abstract suspend fun kick(message: String = "") @@ -146,10 +142,8 @@ expect abstract class Member() : MemberJavaHappyAPI { * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ @JvmSynthetic - @JvmName("sendMessageSuspend") abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt index 63276b529..268906222 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt @@ -28,7 +28,6 @@ import net.mamoe.mirai.message.data.OfflineFriendImage import net.mamoe.mirai.utils.ExternalImage import net.mamoe.mirai.utils.MiraiExperimentalAPI import net.mamoe.mirai.utils.OverFileSizeMaxException -import kotlin.jvm.JvmName import kotlin.jvm.JvmSynthetic /** @@ -98,10 +97,8 @@ expect abstract class QQ() : Contact, CoroutineScope { * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ @JvmSynthetic - @JvmName("sendMessageSuspend") abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -115,7 +112,6 @@ expect abstract class QQ() : Contact, CoroutineScope { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic abstract override suspend fun uploadImage(image: ExternalImage): OfflineFriendImage } \ No newline at end of file diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt index 7df8905d0..8024b87ac 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt @@ -2,8 +2,8 @@ package net.mamoe.mirai -import kotlinx.coroutines.io.ByteReadChannel import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.io.ByteReadChannel import net.mamoe.mirai.contact.* import net.mamoe.mirai.data.AddFriendResult import net.mamoe.mirai.message.MessageReceipt @@ -158,7 +158,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA /** * 挂起协程直到 [Bot] 下线. */ - @JvmName("joinSuspend") @JvmSynthetic actual suspend inline fun join() = network.join() @@ -172,7 +171,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * * @throws LoginFailedException */ - @JvmName("loginSuspend") @JvmSynthetic actual abstract suspend fun login() // endregion @@ -194,14 +192,12 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @see _lowLevelRecallFriendMessage 低级 API * @see _lowLevelRecallGroupMessage 低级 API */ - @JvmName("recallSuspend") @JvmSynthetic actual abstract suspend fun recall(source: MessageSource) /** * 获取图片下载链接 */ - @JvmName("queryImageUrlSuspend") @JvmSynthetic actual abstract suspend fun queryImageUrl(image: Image): String @@ -211,7 +207,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @see ByteReadChannel.copyAndClose * @see ByteReadChannel.copyTo */ - @JvmName("openChannelSuspend") @JvmSynthetic actual abstract suspend fun openChannel(image: Image): ByteReadChannel @@ -221,7 +216,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA * @param message 若需要验证请求时的验证消息. * @param remark 好友备注 */ - @JvmName("addFriendSuspend") @JvmSynthetic @MiraiExperimentalAPI("未支持") actual abstract suspend fun addFriend(id: Long, message: String?, remark: String?): AddFriendResult diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt index 12db10e5d..76d0142be 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt @@ -62,11 +62,9 @@ actual abstract class Contact : CoroutineScope, ContactJavaHappyAPI() { * * @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息. */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -80,7 +78,6 @@ actual abstract class Contact : CoroutineScope, ContactJavaHappyAPI() { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic actual abstract suspend fun uploadImage(image: ExternalImage): OfflineImage diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt index 72a293123..3db823e7b 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt @@ -179,11 +179,9 @@ actual abstract class Group : Contact(), CoroutineScope { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) @JvmSynthetic actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -197,7 +195,6 @@ actual abstract class Group : Contact(), CoroutineScope { * @throws EventCancelledException 当发送消息事件被取消 * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ - @JvmName("uploadImageSuspend") @JvmSynthetic actual abstract override suspend fun uploadImage(image: ExternalImage): OfflineGroupImage diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt index 7ff3edd6f..969fb151f 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt @@ -90,7 +90,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberMuteEvent 成员被禁言事件 * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("muteSuspend") @JvmSynthetic actual abstract suspend fun mute(durationSeconds: Int) @@ -102,7 +101,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberUnmuteEvent 成员被取消禁言事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("muteSuspend") @JvmSynthetic actual abstract suspend fun unmute() @@ -114,7 +112,6 @@ actual abstract class Member : MemberJavaHappyAPI() { * @see MemberLeaveEvent.Kick 成员被踢出事件. * @throws PermissionDeniedException 无权限修改时 */ - @JvmName("muteSuspend") @JvmSynthetic actual abstract suspend fun kick(message: String) @@ -129,11 +126,9 @@ actual abstract class Member : MemberJavaHappyAPI() { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt index 566a9d22d..6579d9669 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt @@ -87,11 +87,9 @@ actual abstract class QQ : Contact(), CoroutineScope { * * @return 消息回执. 可进行撤回 ([MessageReceipt.recall]) */ - @JvmName("sendMessageSuspend") @JvmSynthetic actual abstract override suspend fun sendMessage(message: Message): MessageReceipt - @JvmName("sendMessageSuspend") @JvmSynthetic @Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN) actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt @@ -106,6 +104,5 @@ actual abstract class QQ : Contact(), CoroutineScope { * @throws OverFileSizeMaxException 当图片文件过大而被服务器拒绝上传时. (最大大小约为 20 MB) */ @JvmSynthetic - @JvmName("uploadImageSuspend") actual abstract override suspend fun uploadImage(image: ExternalImage): OfflineFriendImage } \ No newline at end of file diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt index 6742b2248..d18337e0d 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/message/MessageReceipt.kt @@ -107,7 +107,6 @@ actual open class MessageReceipt actual constructor( * 引用这条消息并回复. * @see MessageChain.quote 引用一条消息 */ - @JvmName("quoteReplySuspend") @JvmSynthetic actual suspend fun quoteReply(message: MessageChain) { target.sendMessage(this.quote() + message)