From d43b9edb8e8e065776da2284f35e6864daf5efca Mon Sep 17 00:00:00 2001 From: cssxsh Date: Tue, 15 Aug 2023 23:04:26 +0800 Subject: [PATCH] build: 1.4.2 --- CHANGELOG.md | 13 +++++++++++++ README.md | 4 ++-- build.gradle.kts | 2 +- .../xyz/cssxsh/mirai/admin/MiraiAdminPlugin.kt | 2 +- .../kotlin/xyz/cssxsh/mirai/admin/MiraiService.kt | 2 +- .../xyz/cssxsh/mirai/admin/data/AdminSetting.kt | 4 ++-- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58866e1..3384cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 1.4.2 (23/08/15) + +1. fix: MiraiBlackList.check, close #26 +2. fix: mail docs +3. fix: timer docs + +## 1.4.1 (23/07/13) + +1. fix: MiraiMemberCleaner +2. feat: approver remind, close #24 +3. fix: approver config +4. fix: mail title + ## 1.4.0 (23/05/01) 1. feat: newWatchService catch diff --git a/README.md b/README.md index b5e9e55..c8e70da 100644 --- a/README.md +++ b/README.md @@ -139,8 +139,8 @@ 例如 `/timer mute PT5H "0 0 1 ? * 2-6"`, 将会在 星期一到星期五的凌晨01:00 禁言 5 小时 例如 `/timer mute PT0S "0 0 0 1 * ?"`, 将会 取消 禁言定时器 -5. cleaner 指令,`day` 单位为天数的发言期限, 小于等于 `0` 清理不发言就会关闭 - 例如 `/timer cleaner 30 "0 0 12 ? * 1,7"`, 将会在 星期留、星期天的12:00 清理 30 天未发言的用户 +5. cleaner 指令,`day` 单位为天数的发言期限, 小于等于 `0` 清理不发言就会关闭 + 例如 `/timer cleaner 30 "0 0 12 ? * 1,7"`, 将会在 星期六、星期天的12:00 清理 30 天未发言的用户 例如 `/timer cleaner 0 "0 0 0 1 * ?"`, 将会 取消 清理不发言定时器 ## 配置 diff --git a/build.gradle.kts b/build.gradle.kts index c20976e..951d22a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "xyz.cssxsh.mirai" -version = "1.4.1" +version = "1.4.2" mavenCentralPublish { useCentralS01() diff --git a/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiAdminPlugin.kt b/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiAdminPlugin.kt index be1409f..54c0823 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiAdminPlugin.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiAdminPlugin.kt @@ -20,7 +20,7 @@ internal object MiraiAdminPlugin : KotlinPlugin( JvmPluginDescription( id = "xyz.cssxsh.mirai.plugin.mirai-administrator", name = "mirai-administrator", - version = "1.4.1", + version = "1.4.2", ) { author("cssxsh") } diff --git a/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiService.kt b/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiService.kt index fff6127..f4bcd90 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiService.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/admin/MiraiService.kt @@ -161,7 +161,7 @@ internal fun target(contact: Contact): MessageSource? { internal fun from(member: Member): MessageSource? { for (handler in ComparableService()) { return try { - handler.from(member) ?: continue + handler.from(member = member) ?: continue } catch (cause: Exception) { logger.warning({ "message source find failure." }, cause) continue diff --git a/src/main/kotlin/xyz/cssxsh/mirai/admin/data/AdminSetting.kt b/src/main/kotlin/xyz/cssxsh/mirai/admin/data/AdminSetting.kt index 789aeee..4493703 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/admin/data/AdminSetting.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/admin/data/AdminSetting.kt @@ -51,7 +51,7 @@ internal object AdminSetting : ReadOnlyPluginConfig("AdminSetting"), MiraiConten } } - plugin.launch { + plugin.launch(CoroutineName(name = "CENSOR_WATCH")) { val watcher = try { runInterruptible(Dispatchers.IO) { folder.fileSystem.newWatchService() @@ -87,7 +87,7 @@ internal object AdminSetting : ReadOnlyPluginConfig("AdminSetting"), MiraiConten try { dict[file.name] = file.readLines() } catch (cause: IOException) { - plugin.logger.warning("更新审核库 $file 失败 , ${kind.name()}", cause) + plugin.logger.warning("更新审核库 ${file.toUri()} 失败, ${kind.name()}", cause) } } StandardWatchEventKinds.ENTRY_DELETE -> {