@q78kg/koishi-plugin-text-censor 1.0.4-beta.6 → 1.0.4-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -45,7 +45,6 @@ var Config = import_koishi.Schema.intersect([
|
|
45
45
|
import_koishi.Schema.object({
|
46
46
|
textDatabase: import_koishi.Schema.array(
|
47
47
|
import_koishi.Schema.tuple([
|
48
|
-
import_koishi.Schema.string().role("text"),
|
49
48
|
import_koishi.Schema.string().default("data/text-censor/censor.txt")
|
50
49
|
])
|
51
50
|
).description("敏感词库的文件路径。").default([["", "data/text-censor/censor.txt"]])
|
@@ -60,7 +59,7 @@ var Config = import_koishi.Schema.intersect([
|
|
60
59
|
]);
|
61
60
|
function apply(ctx, config) {
|
62
61
|
let words = [];
|
63
|
-
for (const [
|
62
|
+
for (const [file] of config.textDatabase) {
|
64
63
|
const filePath = (0, import_node_path.resolve)(ctx.baseDir, file);
|
65
64
|
if (!(0, import_node_fs.existsSync)(filePath)) {
|
66
65
|
ctx.logger.warn(
|