Inlined replies

This commit is contained in:
Him188 2019-09-28 01:33:54 +08:00
parent 679f1c3d4d
commit 7b0175e8c7
2 changed files with 8 additions and 8 deletions

View File

@ -12,14 +12,14 @@ import net.mamoe.mirai.message.defaults.MessageChain
class GroupMessageEvent(bot: Bot, group: Group, val sender: QQ, val message: MessageChain) : GroupEvent(bot, group) {
@JvmSynthetic
suspend fun reply(message: Message) = group.sendMessage(message)
suspend inline fun reply(message: Message) = group.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: String) = group.sendMessage(message)
suspend inline fun reply(message: String) = group.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: List<Message>) = group.sendMessage(message)
suspend inline fun reply(message: List<Message>) = group.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: MessageChain) = group.sendMessage(message)
suspend inline fun reply(message: MessageChain) = group.sendMessage(message)
}

View File

@ -11,14 +11,14 @@ import net.mamoe.mirai.message.defaults.MessageChain
class FriendMessageEvent(bot: Bot, sender: QQ, val message: MessageChain) : FriendEvent(bot, sender) {
@JvmSynthetic
suspend fun reply(message: Message) = sender.sendMessage(message)
suspend inline fun reply(message: Message) = sender.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: String) = sender.sendMessage(message)
suspend inline fun reply(message: String) = sender.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: List<Message>) = sender.sendMessage(message)
suspend inline fun reply(message: List<Message>) = sender.sendMessage(message)
@JvmSynthetic
suspend fun reply(message: MessageChain) = sender.sendMessage(message)
suspend inline fun reply(message: MessageChain) = sender.sendMessage(message)
}