chore: update

This commit is contained in:
2024-08-31 22:37:12 +08:00
parent 075a66458a
commit e7d2336759
14 files changed
+199 -32

No files matched your search

@@ -9,6 +9,7 @@ package cn.rtast.fancybot.commands
import cn.rtast.rob.entity.GroupMessage
import cn.rtast.rob.util.BaseCommand
import cn.rtast.rob.util.message.MessageChain
import cn.rtast.rob.util.ob.OBMessage
class QRCodeCommand : BaseCommand() {
@@ -16,9 +17,10 @@ class QRCodeCommand : BaseCommand() {
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
val content = args.joinToString(" ")
listener.sendGroupMessage(
message.groupId,
"[CQ:at,qq=${message.sender.userId}][CQ:image,file=https://api.rtast.cn/api/generate_qr?data=$content]"
)
val msg = MessageChain.Builder()
.addAt(message.sender.userId)
.addImage("https://api.rtast.cn/api/generate_qr?data=$content")
.build()
listener.sendGroupMessage(message.groupId, msg)
}
}