chore: format code

This commit is contained in:
2024-10-06 21:21:05 +08:00
parent 0a5c9b63c2
commit 2b725ab71e
4 files changed
+7 -6

No files matched your search

@@ -56,9 +56,11 @@ class PixivCommand : BaseCommand() {
} catch (_: Exception) { } catch (_: Exception) {
} }
} }
node.addMessageChain(MessageChain.Builder() node.addMessageChain(
.addText("图片来源: Pixiv") MessageChain.Builder()
.build(), configManager.selfId) .addText("图片来源: Pixiv")
.build(), configManager.selfId
)
message.reply(node.build()) message.reply(node.build())
return return
} }
@@ -36,7 +36,7 @@ class GenerateQRCodeCommand : BaseCommand() {
private fun generateQRCode(content: String): String { private fun generateQRCode(content: String): String {
val qrCodeWriter = QRCodeWriter() val qrCodeWriter = QRCodeWriter()
val hints = mapOf(EncodeHintType.CHARACTER_SET to "UTF-8") val hints = mapOf(EncodeHintType.CHARACTER_SET to "UTF-8")
val bitMatrix = qrCodeWriter.encode(content, BarcodeFormat.QR_CODE, 300, 300 , hints) val bitMatrix = qrCodeWriter.encode(content, BarcodeFormat.QR_CODE, 300, 300, hints)
return MatrixToImageWriter.toBufferedImage(bitMatrix).toByteArray().encodeToBase64() return MatrixToImageWriter.toBufferedImage(bitMatrix).toByteArray().encodeToBase64()
} }
@@ -9,7 +9,7 @@ package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table
object ActionTable: Table("action") { object ActionTable : Table("action") {
val id = integer("id").autoIncrement().nullable() val id = integer("id").autoIncrement().nullable()
val action = varchar("action", 255).nullable() val action = varchar("action", 255).nullable()
val timestamp = long("timestamp").nullable() val timestamp = long("timestamp").nullable()
@@ -11,7 +11,6 @@ import cn.rtast.fancybot.*
import cn.rtast.rob.ROneBotFactory import cn.rtast.rob.ROneBotFactory
import cn.rtast.rob.util.ob.OneBotListener import cn.rtast.rob.util.ob.OneBotListener
import java.io.File import java.io.File
import java.net.URI
import kotlin.random.Random import kotlin.random.Random
fun randomBooleanWithProbability(probability: Double): Boolean { fun randomBooleanWithProbability(probability: Double): Boolean {