Skip to content

Commit 9b33b21

Browse files
committed
update: baidu sdk 3.1.0
1 parent 9603ec5 commit 9b33b21

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

build.gradle.kts

+3-14
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,13 @@ repositories {
2424
}
2525

2626
dependencies {
27-
implementation("xyz.cssxsh.baidu:baidu-aip:3.0.0") {
28-
exclude(group = "org.jetbrains.kotlin")
29-
exclude(group = "io.ktor")
30-
}
31-
implementation("io.ktor:ktor-client-serialization:1.6.7") {
32-
exclude(group = "org.jetbrains.kotlin")
33-
exclude(group = "org.jetbrains.kotlinx")
34-
exclude(group = "org.slf4j")
35-
exclude(group = "io.ktor", module = "ktor-client-core")
36-
}
37-
implementation("io.ktor:ktor-client-encoding:1.6.7") {
27+
implementation("xyz.cssxsh.baidu:baidu-aip:3.1.0") {
3828
exclude(group = "org.jetbrains.kotlin")
3929
exclude(group = "org.jetbrains.kotlinx")
4030
exclude(group = "org.slf4j")
41-
exclude(group = "io.ktor", module = "ktor-client-core")
4231
}
43-
compileOnly("xyz.cssxsh.mirai:mirai-administrator:1.1.0")
44-
compileOnly("net.mamoe:mirai-core-utils:2.11.1")
32+
compileOnly("xyz.cssxsh.mirai:mirai-administrator:1.2.4")
33+
compileOnly("net.mamoe:mirai-core-utils:2.12.0")
4534
//
4635
testImplementation(kotlin("test", "1.6.21"))
4736
}

src/main/kotlin/io/github/gnuf0rce/mirai/censor/MiraiContentCensor.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package io.github.gnuf0rce.mirai.censor
33
import io.github.gnuf0rce.mirai.censor.data.*
44
import io.ktor.client.*
55
import io.ktor.client.engine.okhttp.*
6-
import io.ktor.client.features.*
6+
import io.ktor.client.plugins.*
77
import io.ktor.http.*
88
import io.ktor.utils.io.errors.*
99
import kotlinx.coroutines.*
@@ -18,7 +18,6 @@ public object MiraiContentCensor : AipContentCensor(client = object : BaiduAipCl
1818

1919
override val apiIgnore: suspend (Throwable) -> Boolean = { throwable ->
2020
when (throwable) {
21-
is HttpRequestTimeoutException,
2221
is IOException
2322
-> {
2423
logger.warning { "AipContentCensor Ignore: $throwable" }

0 commit comments

Comments
 (0)