koishi-plugin-808ps-qunmax 0.0.1 → 0.0.2
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 +115 -74
- package/lib/index.js +946 -311
- package/package.json +2 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,94 +1,135 @@
|
|
|
1
|
-
import { Schema, Logger, Context } from 'koishi';
|
|
1
|
+
import { Schema, Logger, Context, Observed } from 'koishi';
|
|
2
2
|
declare module 'koishi' {
|
|
3
|
+
interface BaseIdObject {
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
3
6
|
interface Session {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
guild_id?: string;
|
|
8
|
+
user_id?: string;
|
|
9
|
+
sub_type?: string;
|
|
10
|
+
event?: {
|
|
11
|
+
_data?: {
|
|
12
|
+
sub_type?: string;
|
|
13
|
+
operator_id?: string | number;
|
|
14
|
+
group_id?: string | number;
|
|
15
|
+
};
|
|
16
|
+
sub_type?: string;
|
|
17
|
+
subtype?: string;
|
|
18
|
+
guild?: Observed<BaseIdObject>;
|
|
19
|
+
channel?: Observed<BaseIdObject>;
|
|
20
|
+
group_id?: string | number;
|
|
21
|
+
user?: Observed<BaseIdObject>;
|
|
22
|
+
};
|
|
23
|
+
_data?: {
|
|
24
|
+
sub_type?: string;
|
|
25
|
+
group_id?: string | number;
|
|
26
|
+
};
|
|
27
|
+
notice?: {
|
|
28
|
+
_data?: {
|
|
29
|
+
sub_type?: string;
|
|
30
|
+
subtype?: string;
|
|
31
|
+
operator_id?: string | number;
|
|
32
|
+
};
|
|
33
|
+
operator?: Observed<BaseIdObject>;
|
|
34
|
+
};
|
|
35
|
+
operator?: Observed<BaseIdObject>;
|
|
36
|
+
guildId?: string;
|
|
37
|
+
channelId?: string;
|
|
38
|
+
userId?: string;
|
|
11
39
|
}
|
|
12
40
|
}
|
|
13
|
-
interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
interface DatabaseConfig {
|
|
42
|
+
主机: string;
|
|
43
|
+
端口: number;
|
|
44
|
+
用户名: string;
|
|
45
|
+
密码: string;
|
|
46
|
+
'808ps数据库名': string;
|
|
47
|
+
游戏数据库名: string;
|
|
48
|
+
qk数据库名: string;
|
|
20
49
|
}
|
|
21
|
-
interface
|
|
50
|
+
interface DutyConfig {
|
|
22
51
|
上岗密码: string;
|
|
23
|
-
|
|
24
|
-
|
|
52
|
+
有效期小时: number;
|
|
53
|
+
每日获取上限: number;
|
|
54
|
+
}
|
|
55
|
+
interface RegisterReward {
|
|
56
|
+
点券: number;
|
|
57
|
+
代币: number;
|
|
25
58
|
}
|
|
26
|
-
interface
|
|
27
|
-
|
|
28
|
-
邀请进群监控: boolean;
|
|
29
|
-
被踢群监控: boolean;
|
|
30
|
-
主动退群监控: boolean;
|
|
59
|
+
interface RewardConfig {
|
|
60
|
+
注册奖励: RegisterReward;
|
|
31
61
|
}
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
62
|
+
interface MonitorSwitch {
|
|
63
|
+
主动入群: boolean;
|
|
64
|
+
被邀请入群: boolean;
|
|
65
|
+
被踢出群: boolean;
|
|
66
|
+
主动退群: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface KeywordRule {
|
|
69
|
+
关键词: string;
|
|
70
|
+
回复内容: string;
|
|
71
|
+
是否撤回: boolean;
|
|
72
|
+
是否禁言: boolean;
|
|
37
73
|
禁言秒数: number;
|
|
38
|
-
|
|
74
|
+
是否通知管理员: boolean;
|
|
39
75
|
}
|
|
40
|
-
interface
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
76
|
+
interface SpamConfig {
|
|
77
|
+
统计窗口秒: number;
|
|
78
|
+
消息条数: number;
|
|
79
|
+
是否撤回: boolean;
|
|
80
|
+
是否禁言: boolean;
|
|
81
|
+
禁言秒数: number;
|
|
82
|
+
是否通知管理员: boolean;
|
|
47
83
|
}
|
|
48
|
-
interface
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
对话温度随机值: number;
|
|
53
|
-
AI系统人设提示词: string;
|
|
84
|
+
interface AntiCrossConfig {
|
|
85
|
+
是否启用串群检测: boolean;
|
|
86
|
+
是否通知管理员: boolean;
|
|
87
|
+
例外QQ列表: number[];
|
|
54
88
|
}
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
89
|
+
interface AIConfig {
|
|
90
|
+
API密钥: string;
|
|
91
|
+
模型: string;
|
|
92
|
+
最大Token数: number;
|
|
93
|
+
温度值: number;
|
|
94
|
+
系统提示语: string;
|
|
59
95
|
}
|
|
60
|
-
interface
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
interface ChannelConfig {
|
|
97
|
+
渠道名称: string;
|
|
98
|
+
绑定群号列表: number[];
|
|
99
|
+
子管理员QQ: number[];
|
|
100
|
+
入群欢迎语: string;
|
|
101
|
+
是否启用入群欢迎: boolean;
|
|
102
|
+
关键词列表: KeywordRule[];
|
|
103
|
+
是否启用关键词检测: boolean;
|
|
104
|
+
监控开关: MonitorSwitch;
|
|
105
|
+
刷屏设置: SpamConfig;
|
|
106
|
+
是否启用刷屏检测: boolean;
|
|
107
|
+
是否通知进退群: boolean;
|
|
64
108
|
}
|
|
65
|
-
interface
|
|
66
|
-
机器人QQ
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
群成员定时同步间隔分钟: number;
|
|
79
|
-
注册赠送初始点券: number;
|
|
80
|
-
注册赠送初始代币: number;
|
|
109
|
+
interface PluginConfig {
|
|
110
|
+
机器人QQ号: number[];
|
|
111
|
+
总管理员QQ: number[];
|
|
112
|
+
数据库配置: DatabaseConfig;
|
|
113
|
+
值班配置: DutyConfig;
|
|
114
|
+
奖励配置: RewardConfig;
|
|
115
|
+
AI配置: AIConfig;
|
|
116
|
+
防串群配置: AntiCrossConfig;
|
|
117
|
+
重复推送限制小时: number;
|
|
118
|
+
进退群延迟秒: number;
|
|
119
|
+
定时同步分钟: number;
|
|
120
|
+
渠道配置: ChannelConfig[];
|
|
121
|
+
外群监控配置: MonitorSwitch;
|
|
81
122
|
}
|
|
82
|
-
export declare const
|
|
83
|
-
export declare const
|
|
84
|
-
export declare const
|
|
85
|
-
export declare
|
|
86
|
-
export declare
|
|
123
|
+
export declare const name = "808ps-bot";
|
|
124
|
+
export declare const logger: Logger;
|
|
125
|
+
export declare const using: string[];
|
|
126
|
+
export declare const Config: Schema<PluginConfig>;
|
|
127
|
+
export declare function apply(ctx: Context, config: PluginConfig): Promise<void>;
|
|
87
128
|
declare const _default: {
|
|
88
|
-
|
|
89
|
-
Config: Schema
|
|
129
|
+
name: string;
|
|
130
|
+
Config: Schema<PluginConfig>;
|
|
90
131
|
apply: typeof apply;
|
|
91
|
-
|
|
132
|
+
using: string[];
|
|
92
133
|
description: string;
|
|
93
134
|
};
|
|
94
135
|
export default _default;
|