Remove all unnecessary java-friendly JvmName magics

This commit is contained in:
Him188 2020-03-23 20:05:17 +08:00
parent ac263579f6
commit fccb69bb3f
18 changed files with 1 additions and 80 deletions

View File

@ -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<out QQ> {
@ -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<out QQ> {
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<Member> {
@ -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<out QQ> {
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<Group> {
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<Group> {
@ -665,7 +654,6 @@ internal class GroupImpl(
}
@JvmName("uploadImageSuspend")
@JvmSynthetic
override suspend fun uploadImage(image: ExternalImage): OfflineGroupImage = try {
if (BeforeImageUploadEvent(this, image).broadcast().isCancelled) {

View File

@ -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

View File

@ -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<out Contact>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract suspend fun sendMessage(message: MessageChain): MessageReceipt<out Contact>
@ -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

View File

@ -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<Group>
@JvmName("sendMessageSuspend")
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
@JvmSynthetic
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<Group>
@ -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

View File

@ -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<Member>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>
@ -134,7 +130,6 @@ actual abstract class Member : MemberJavaHappyAPI() {
* @see MemberLeaveEvent.Kick 成员被踢出事件.
* @throws PermissionDeniedException 无权限修改时
*/
@JvmName("kickSuspend")
@JvmSynthetic
actual abstract suspend fun kick(message: String)

View File

@ -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<out QQ>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>
@ -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
}

View File

@ -115,7 +115,6 @@ actual open class MessageReceipt<C : Contact> actual constructor(
* 引用这条消息并回复.
* @see MessageChain.quote 引用一条消息
*/
@JvmName("quoteReplySuspend")
@JvmSynthetic
actual suspend fun quoteReply(message: MessageChain) {
target.sendMessage(this.quote() + message)

View File

@ -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

View File

@ -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<out Contact>
@JvmName("sendMessageSuspend")
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
@JvmSynthetic
abstract suspend fun sendMessage(message: MessageChain): MessageReceipt<out Contact>
@ -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

View File

@ -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<Group>
@JvmName("sendMessageSuspend")
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
@JvmSynthetic
abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<Group>
@ -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

View File

@ -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<Member>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>

View File

@ -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<out QQ>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>
@ -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
}

View File

@ -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

View File

@ -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<out Contact>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract suspend fun sendMessage(message: MessageChain): MessageReceipt<out Contact>
@ -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

View File

@ -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<Group>
@JvmName("sendMessageSuspend")
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
@JvmSynthetic
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<Group>
@ -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

View File

@ -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<Member>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>

View File

@ -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<out QQ>
@JvmName("sendMessageSuspend")
@JvmSynthetic
@Deprecated("for binary compatibility", level = DeprecationLevel.HIDDEN)
actual abstract override suspend fun sendMessage(message: MessageChain): MessageReceipt<out QQ>
@ -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
}

View File

@ -107,7 +107,6 @@ actual open class MessageReceipt<C : Contact> actual constructor(
* 引用这条消息并回复.
* @see MessageChain.quote 引用一条消息
*/
@JvmName("quoteReplySuspend")
@JvmSynthetic
actual suspend fun quoteReply(message: MessageChain) {
target.sendMessage(this.quote() + message)