koishi-plugin-best-cave 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +6 -30
- package/lib/index.js +834 -425
- package/lib/utils/HashStorage.d.ts +34 -0
- package/lib/utils/ImageHasher.d.ts +27 -0
- package/lib/utils/fileHandler.d.ts +19 -0
- package/lib/utils/idManager.d.ts +17 -0
- package/package.json +8 -2
- package/readme.md +29 -8
package/lib/index.d.ts
CHANGED
|
@@ -1,42 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 回声洞插件 - 主文件
|
|
3
|
-
* @module best-cave
|
|
4
|
-
* @description 提供回声洞功能的Koishi插件,支持文本、图片、视频投稿与管理
|
|
5
|
-
*/
|
|
6
1
|
import { Context, Schema } from 'koishi';
|
|
7
2
|
export declare const name = "best-cave";
|
|
8
3
|
export declare const inject: string[];
|
|
9
4
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
12
|
-
* manager: 管理员用户ID列表
|
|
13
|
-
* blacklist: 黑名单用户ID列表
|
|
14
|
-
* whitelist: 白名单用户ID列表(可跳过审核)
|
|
15
|
-
* number: 命令冷却时间(秒)
|
|
16
|
-
* enableAudit: 是否启用投稿审核
|
|
17
|
-
* allowVideo: 是否允许视频投稿
|
|
18
|
-
* videoMaxSize: 视频文件大小限制(MB)
|
|
19
|
-
* imageMaxSize: 图片文件大小限制(MB)
|
|
20
|
-
* enablePagination: 是否启用分页显示
|
|
21
|
-
* itemsPerPage: 每页显示条目数
|
|
5
|
+
* 插件配置项
|
|
6
|
+
* @type {Schema}
|
|
22
7
|
*/
|
|
23
8
|
export declare const Config: Schema<Config>;
|
|
24
9
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param ctx Koishi
|
|
27
|
-
* @param config
|
|
28
|
-
* @description 初始化插件环境,注册命令与处理函数
|
|
10
|
+
* 插件主入口
|
|
11
|
+
* @param {Context} ctx - Koishi上下文
|
|
12
|
+
* @param {Config} config - 插件配置
|
|
29
13
|
*/
|
|
30
14
|
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
31
|
-
export interface User {
|
|
32
|
-
userId: string;
|
|
33
|
-
username: string;
|
|
34
|
-
nickname?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface getStrangerInfo {
|
|
37
|
-
user_id: string;
|
|
38
|
-
nickname: string;
|
|
39
|
-
}
|
|
40
15
|
export interface Config {
|
|
41
16
|
manager: string[];
|
|
42
17
|
number: number;
|
|
@@ -48,4 +23,5 @@ export interface Config {
|
|
|
48
23
|
whitelist: string[];
|
|
49
24
|
enablePagination: boolean;
|
|
50
25
|
itemsPerPage: number;
|
|
26
|
+
duplicateThreshold: number;
|
|
51
27
|
}
|