feat: add reaction command

This commit is contained in:
2024-10-01 18:54:25 +08:00
parent bf9e6dd311
commit 805c6d56c2
4 files changed
+28 -4

No files matched your search

@@ -0,0 +1,28 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/8
*/
package cn.rtast.fancybot.commands.misc
import cn.rtast.fancybot.annotations.CommandDescription
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
@CommandDescription("资料卡点赞")
class SendLikeCommand : BaseCommand() {
override val commandNames = listOf("赞我")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
listener.sendLike(message.sender.userId, 10)
val msg = MessageChain.Builder()
.addReply(message.messageId)
.addText("👍了你十下~~😁")
.build()
listener.sendGroupMessage(message.groupId, msg)
}
}