From 0de3c7355aa533df0d235134577975a3b6ce0930 Mon Sep 17 00:00:00 2001 From: cssxsh Date: Thu, 19 Jan 2023 15:20:32 +0800 Subject: [PATCH] build: 1.1.7 --- build.gradle.kts | 16 +++++++--------- src/main/kotlin/MemeHelperPlugin.kt | 2 +- src/main/kotlin/impl/MemeRecord.kt | 4 +++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f6cb12a..51b89d6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,12 +2,12 @@ plugins { kotlin("jvm") version "1.7.22" kotlin("plugin.serialization") version "1.7.22" - id("net.mamoe.mirai-console") version "2.13.2" + id("net.mamoe.mirai-console") version "2.14.0-RC" id("me.him188.maven-central-publish") version "1.0.0-dev-3" } group = "xyz.cssxsh" -version = "1.1.6" +version = "1.1.7" repositories { mavenLocal() @@ -28,24 +28,22 @@ mavenCentralPublish { dependencies { compileOnly("xyz.cssxsh:bilibili-helper:1.6.6") compileOnly("xyz.cssxsh:weibo-helper:1.5.8") - compileOnly("xyz.cssxsh.mirai:mirai-hibernate-plugin:2.5.1") - compileOnly("xyz.cssxsh.mirai:mirai-skia-plugin:1.2.3") + compileOnly("xyz.cssxsh.mirai:mirai-hibernate-plugin:2.5.2") + compileOnly("xyz.cssxsh.mirai:mirai-skia-plugin:1.2.4") testImplementation(kotlin("test")) - testImplementation("xyz.cssxsh.mirai:mirai-skia-plugin:1.2.3") + testImplementation("xyz.cssxsh.mirai:mirai-skia-plugin:1.2.4") // - implementation(platform("net.mamoe:mirai-bom:2.13.2")) + implementation(platform("net.mamoe:mirai-bom:2.14.0-RC")) compileOnly("net.mamoe:mirai-core") compileOnly("net.mamoe:mirai-core-utils") compileOnly("net.mamoe:mirai-console-compiler-common") - testImplementation("net.mamoe:mirai-logging-slf4j") testImplementation("net.mamoe:mirai-core-utils") // - implementation(platform("io.ktor:ktor-bom:2.2.1")) + implementation(platform("io.ktor:ktor-bom:2.2.2")) implementation("io.ktor:ktor-client-okhttp") implementation("io.ktor:ktor-client-encoding") // implementation(platform("org.slf4j:slf4j-parent:2.0.6")) - testImplementation("org.slf4j:slf4j-simple") } mirai { diff --git a/src/main/kotlin/MemeHelperPlugin.kt b/src/main/kotlin/MemeHelperPlugin.kt index f31dea4..e88f872 100644 --- a/src/main/kotlin/MemeHelperPlugin.kt +++ b/src/main/kotlin/MemeHelperPlugin.kt @@ -12,7 +12,7 @@ public object MemeHelperPlugin : KotlinPlugin( JvmPluginDescription( id = "xyz.cssxsh.mirai.plugin.meme-helper", name = "meme-helper", - version = "1.1.6", + version = "1.1.7", ) { author("cssxsh") dependsOn("xyz.cssxsh.mirai.plugin.mirai-skia-plugin", ">= 1.1.0", false) diff --git a/src/main/kotlin/impl/MemeRecord.kt b/src/main/kotlin/impl/MemeRecord.kt index 9ad3c84..0111959 100644 --- a/src/main/kotlin/impl/MemeRecord.kt +++ b/src/main/kotlin/impl/MemeRecord.kt @@ -67,7 +67,9 @@ public class MemeRecord : MemeService { val record = if (tag.startsWith('#')) { FaceRecord.random() } else { - FaceRecord.match(tag = tag).randomOrNull() ?: return null + FaceRecord.match(tag = tag).randomOrNull() + ?: MiraiHibernateRecorder.face(md5 = tag) + ?: return null } val message = record.toMessageContent() if (message is Image && message.isUploaded(bot).not()) {