Files
FancyBot/src/main/kotlin/cn/rtast/fancybot/commands/misc/SendLikeCommand.kt
T

28 lines
840 B
Kotlin
Raw Normal View History

2024-09-08 19:29:21 +08:00
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/8
*/
2024-09-20 16:30:33 +08:00
package cn.rtast.fancybot.commands.misc
2024-09-08 19:29:21 +08:00
import cn.rtast.fancybot.annotations.CommandDescription
2024-09-08 19:29:21 +08:00
import cn.rtast.rob.entity.GroupMessage
import cn.rtast.rob.util.BaseCommand
import cn.rtast.rob.util.ob.MessageChain
import cn.rtast.rob.util.ob.OneBotListener
2024-09-08 19:29:21 +08:00
@CommandDescription("资料卡点赞")
2024-10-01 18:54:25 +08:00
class SendLikeCommand : BaseCommand() {
2024-09-08 19:29:21 +08:00
override val commandNames = listOf("赞我")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
2024-09-08 19:29:21 +08:00
listener.sendLike(message.sender.userId, 10)
val msg = MessageChain.Builder()
.addReply(message.messageId)
.addText("👍了你十下~~😁")
.build()
listener.sendGroupMessage(message.groupId, msg)
}
}