feat: add pastebin generate action log
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -13,7 +13,9 @@ import cn.rtast.fancybot.commands.misc.ShortLinkCommand.Companion.makeShortLink
|
||||
import cn.rtast.fancybot.configManager
|
||||
import cn.rtast.fancybot.entity.pastebin.PastebinPayload
|
||||
import cn.rtast.fancybot.entity.pastebin.PastebinResponse
|
||||
import cn.rtast.fancybot.enums.CommandAction
|
||||
import cn.rtast.fancybot.util.Http
|
||||
import cn.rtast.fancybot.util.file.insertActionRecord
|
||||
import cn.rtast.fancybot.util.str.toJson
|
||||
import cn.rtast.rob.entity.GroupMessage
|
||||
import cn.rtast.rob.util.BaseCommand
|
||||
@@ -31,5 +33,6 @@ class PastebinCommand : BaseCommand() {
|
||||
params = mapOf("key" to configManager.apiRtastKey)
|
||||
)
|
||||
message.reply("$API_RTAST_URL/api/pp/${response.id}?raw=true".makeShortLink())
|
||||
insertActionRecord(CommandAction.Pastebin, message.sender.userId, content)
|
||||
}
|
||||
}
|
||||
@@ -10,5 +10,5 @@ package cn.rtast.fancybot.enums
|
||||
enum class CommandAction(val action: String) {
|
||||
SendMail("发送邮件"), Echo("使用Echo"), GenQRCode("生成二维码"),
|
||||
Status("获取状态"), Compiler("执行语言代码"), AntiRevoke("防撤回"),
|
||||
Wiki("查询Wiki"), AI("问AI")
|
||||
Wiki("查询Wiki"), AI("问AI"), Pastebin("生成pastebin")
|
||||
}
|
||||
Reference in New Issue
Block a user