feat: add compiler and format class dir
This commit is contained in:
23 files changed
+128
-68
No files matched your search
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/30
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.commands.lookup
|
||||
|
||||
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.OBMessage
|
||||
|
||||
class QRCodeCommand : BaseCommand() {
|
||||
override val commandNames = listOf("/qrcode", "/qr", "/二维码")
|
||||
|
||||
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
|
||||
val content = args.joinToString(" ")
|
||||
val msg = MessageChain.Builder()
|
||||
.addAt(message.sender.userId)
|
||||
.addImage("https://api.rtast.cn/api/generate_qr?data=$content")
|
||||
.build()
|
||||
listener.sendGroupMessage(message.groupId, msg)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user