chore: format code

This commit is contained in:
2024-10-12 15:23:21 +08:00
parent 6bc77fb4ac
commit 83e3404665
4 files changed
+5 -5

No files matched your search

@@ -26,7 +26,7 @@ class TheCatCommand : BaseCommand() {
private val theCatApiUrl = "https://api.thecatapi.com/v1/images/search" private val theCatApiUrl = "https://api.thecatapi.com/v1/images/search"
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) { override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
val imageBase64= Http.get(theCatApiUrl) val imageBase64 = Http.get(theCatApiUrl)
.fromArrayJson<List<Cat>>().first().url .fromArrayJson<List<Cat>>().first().url
.proxy.toURL().readBytes().encodeToBase64() .proxy.toURL().readBytes().encodeToBase64()
val msg = MessageChain.Builder().addImage(imageBase64, true).build() val msg = MessageChain.Builder().addImage(imageBase64, true).build()
@@ -126,7 +126,7 @@ class AsciiArtCommand : BaseCommand() {
} }
logger.info("合成GIF中...") logger.info("合成GIF中...")
val gifBytes = decoder.makeGif(asciiFrames) val gifBytes = decoder.makeGif(asciiFrames)
val imageBedUrl = ImageBed.upload(gifBytes, gifBytes.getFileType()).makeShortLink() val imageBedUrl = ImageBed.upload(gifBytes, gifBytes.getFileType()).makeShortLink()
logger.info("合并完成") logger.info("合并完成")
val gifBase64 = gifBytes.encodeToBase64() val gifBase64 = gifBytes.encodeToBase64()
logger.info("处理后的图片大小: ${(gifBytes.size / 1024 / 1024).toInt()}MB") logger.info("处理后的图片大小: ${(gifBytes.size / 1024 / 1024).toInt()}MB")
@@ -9,7 +9,7 @@ package cn.rtast.fancybot.db
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table
object BlackListTable: Table("blacklist") { object BlackListTable : Table("blacklist") {
val id = integer("id").autoIncrement() val id = integer("id").autoIncrement()
val groupId = long("group_id") val groupId = long("group_id")
val operator = long("operator") val operator = long("operator")
@@ -7,5 +7,5 @@
package cn.rtast.fancybot.entity.wiki package cn.rtast.fancybot.entity.wiki
data class WikipediaConvertPayload(val content: String, ) data class WikipediaConvertPayload(val content: String)
data class WikipediaConvertResponse(val parsed: String, ) data class WikipediaConvertResponse(val parsed: String)