mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 01:30:17 +08:00
Explicitly state return type
This commit is contained in:
parent
99586f226d
commit
eb258bbd5c
@ -9,6 +9,7 @@
|
||||
|
||||
package net.mamoe.mirai.message
|
||||
|
||||
import kotlinx.coroutines.Job
|
||||
import net.mamoe.mirai.Bot
|
||||
import net.mamoe.mirai.contact.*
|
||||
import net.mamoe.mirai.event.Event
|
||||
@ -44,25 +45,25 @@ class GroupMessage(
|
||||
* 对于好友消息事件, 这个方法将会给好友 ([subject]) 发送消息
|
||||
* 对于群消息事件, 这个方法将会给群 ([subject]) 发送消息
|
||||
*/
|
||||
suspend inline fun quoteReply(message: MessageChain) = reply(this.message.quote() + message)
|
||||
suspend inline fun quoteReply(message: MessageChain): MessageReceipt<Group> = reply(this.message.quote() + message)
|
||||
|
||||
suspend inline fun quoteReply(message: Message) = reply(this.message.quote() + message)
|
||||
suspend inline fun quoteReply(plain: String) = reply(this.message.quote() + plain)
|
||||
suspend inline fun quoteReply(message: Message): MessageReceipt<Group> = reply(this.message.quote() + message)
|
||||
suspend inline fun quoteReply(plain: String): MessageReceipt<Group> = reply(this.message.quote() + plain)
|
||||
|
||||
|
||||
@JvmName("reply2")
|
||||
suspend inline fun String.quoteReply() = quoteReply(this)
|
||||
suspend inline fun String.quoteReply(): MessageReceipt<Group> = quoteReply(this)
|
||||
|
||||
@JvmName("reply2")
|
||||
suspend inline fun Message.quoteReply() = quoteReply(this)
|
||||
suspend inline fun Message.quoteReply(): MessageReceipt<Group> = quoteReply(this)
|
||||
|
||||
@JvmName("reply2")
|
||||
suspend inline fun MessageChain.quoteReply() = quoteReply(this)
|
||||
suspend inline fun MessageChain.quoteReply(): MessageReceipt<Group> = quoteReply(this)
|
||||
|
||||
suspend inline fun MessageChain.recall() = group.recall(this)
|
||||
suspend inline fun MessageSource.recall() = group.recall(this)
|
||||
inline fun MessageSource.recallIn(delay: Long) = group.recallIn(this, delay)
|
||||
inline fun MessageChain.recallIn(delay: Long) = group.recallIn(this, delay)
|
||||
inline fun MessageSource.recallIn(delay: Long): Job = group.recallIn(this, delay)
|
||||
inline fun MessageChain.recallIn(delay: Long): Job = group.recallIn(this, delay)
|
||||
|
||||
override fun toString(): String =
|
||||
"GroupMessage(group=${group.id}, senderName=$senderName, sender=${sender.id}, permission=${permission.name}, message=$message)"
|
||||
|
Loading…
Reference in New Issue
Block a user