@zhin.js/plugin-group-suite 1.0.1 → 1.1.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/README.md +42 -58
- package/agent/tools/group_announce.ts +12 -0
- package/commands/checkin.js +11 -0
- package/commands/checkin.ts +12 -0
- package/commands/forget.js +10 -0
- package/commands/forget.ts +12 -0
- package/commands/keyword-add/[keyword].js +16 -0
- package/commands/keyword-add/[keyword].ts +16 -0
- package/commands/keyword-list.js +14 -0
- package/commands/keyword-list.ts +14 -0
- package/commands/keyword-remove/[keyword].js +16 -0
- package/commands/keyword-remove/[keyword].ts +15 -0
- package/commands/mypoints.js +10 -0
- package/commands/mypoints.ts +12 -0
- package/commands/mystats.js +10 -0
- package/commands/mystats.ts +12 -0
- package/commands/rank.js +11 -0
- package/commands/rank.ts +12 -0
- package/commands/stats-rank.js +13 -0
- package/commands/stats-rank.ts +20 -0
- package/commands/stats-week.js +13 -0
- package/commands/stats-week.ts +20 -0
- package/commands/stats.js +14 -0
- package/commands/stats.ts +21 -0
- package/commands/teach-list/[[page]].js +13 -0
- package/commands/teach-list/[[page]].ts +14 -0
- package/commands/teach-regex.js +11 -0
- package/commands/teach-regex.ts +12 -0
- package/commands/teach.js +11 -0
- package/commands/teach.ts +12 -0
- package/lib/checkin-lib.d.ts +27 -0
- package/lib/checkin-lib.d.ts.map +1 -0
- package/lib/checkin-lib.js +134 -0
- package/lib/checkin-lib.js.map +1 -0
- package/lib/config.d.ts +4 -57
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +18 -40
- package/lib/config.js.map +1 -1
- package/lib/db-store.d.ts +12 -0
- package/lib/db-store.d.ts.map +1 -0
- package/lib/db-store.js +38 -0
- package/lib/db-store.js.map +1 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -29
- package/lib/index.js.map +1 -1
- package/lib/keyword-store.d.ts +6 -0
- package/lib/keyword-store.d.ts.map +1 -0
- package/lib/keyword-store.js +21 -0
- package/lib/keyword-store.js.map +1 -0
- package/lib/memory-store.d.ts +31 -0
- package/lib/memory-store.d.ts.map +1 -0
- package/lib/memory-store.js +63 -0
- package/lib/memory-store.js.map +1 -0
- package/lib/runtime-state.d.ts +25 -0
- package/lib/runtime-state.d.ts.map +1 -0
- package/lib/runtime-state.js +21 -0
- package/lib/runtime-state.js.map +1 -0
- package/lib/shared-runtime.d.ts +26 -0
- package/lib/shared-runtime.d.ts.map +1 -0
- package/lib/shared-runtime.js +34 -0
- package/lib/shared-runtime.js.map +1 -0
- package/lib/stats-lib.d.ts +41 -0
- package/lib/stats-lib.d.ts.map +1 -0
- package/lib/stats-lib.js +177 -0
- package/lib/stats-lib.js.map +1 -0
- package/lib/tables.d.ts +4 -0
- package/lib/tables.d.ts.map +1 -0
- package/lib/tables.js +40 -0
- package/lib/tables.js.map +1 -0
- package/lib/teach-lib.d.ts +25 -0
- package/lib/teach-lib.d.ts.map +1 -0
- package/lib/teach-lib.js +233 -0
- package/lib/teach-lib.js.map +1 -0
- package/middlewares/keyword-reply.js +36 -0
- package/middlewares/keyword-reply.ts +37 -0
- package/middlewares/stats-count.js +20 -0
- package/middlewares/stats-count.ts +22 -0
- package/middlewares/teach-reply.js +21 -0
- package/middlewares/teach-reply.ts +22 -0
- package/package.json +53 -14
- package/plugin.js +40 -0
- package/schema.json +17 -0
- package/src/checkin-lib.ts +165 -0
- package/src/config.ts +23 -57
- package/src/db-store.ts +51 -0
- package/src/index.ts +47 -33
- package/src/keyword-store.ts +24 -0
- package/src/memory-store.ts +90 -0
- package/src/runtime-state.ts +44 -0
- package/src/shared-runtime.ts +44 -0
- package/src/stats-lib.ts +205 -0
- package/src/tables.ts +46 -0
- package/src/teach-lib.ts +301 -0
- package/tools/checkin-query/handler.js +22 -0
- package/tools/checkin-query/handler.ts +2 -2
- package/tools/checkin-rank/handler.js +15 -0
- package/tools/checkin-rank/handler.ts +1 -1
- package/tools/stats-query/handler.js +28 -0
- package/tools/stats-query/handler.ts +2 -2
- package/tools/stats-user/handler.js +29 -0
- package/tools/stats-user/handler.ts +3 -2
- package/lib/admin.d.ts +0 -4
- package/lib/admin.d.ts.map +0 -1
- package/lib/admin.js +0 -123
- package/lib/admin.js.map +0 -1
- package/lib/checkin.d.ts +0 -5
- package/lib/checkin.d.ts.map +0 -1
- package/lib/checkin.js +0 -168
- package/lib/checkin.js.map +0 -1
- package/lib/daily-analysis.d.ts +0 -7
- package/lib/daily-analysis.d.ts.map +0 -1
- package/lib/daily-analysis.js +0 -334
- package/lib/daily-analysis.js.map +0 -1
- package/lib/shared.d.ts +0 -25
- package/lib/shared.d.ts.map +0 -1
- package/lib/shared.js +0 -40
- package/lib/shared.js.map +0 -1
- package/lib/stats.d.ts +0 -12
- package/lib/stats.d.ts.map +0 -1
- package/lib/stats.js +0 -256
- package/lib/stats.js.map +0 -1
- package/lib/teach.d.ts +0 -4
- package/lib/teach.d.ts.map +0 -1
- package/lib/teach.js +0 -294
- package/lib/teach.js.map +0 -1
- package/plugin.yml +0 -3
- package/src/admin.ts +0 -145
- package/src/checkin.ts +0 -196
- package/src/daily-analysis.ts +0 -458
- package/src/shared.ts +0 -51
- package/src/stats.ts +0 -297
- package/src/teach.ts +0 -307
- /package/{skills/checkin/SKILL.md → agent/skills/checkin.md} +0 -0
- /package/{skills/group-daily-analysis/SKILL.md → agent/skills/group-daily-analysis.md} +0 -0
package/src/admin.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatCompact,
|
|
3
|
-
MessageCommand,
|
|
4
|
-
type Plugin,
|
|
5
|
-
ZhinTool,
|
|
6
|
-
} from "zhin.js";
|
|
7
|
-
import { adapterAllowed } from "./shared.js";
|
|
8
|
-
import type { GroupSuiteConfig } from "./config.js";
|
|
9
|
-
|
|
10
|
-
export function registerAdmin(plugin: Plugin, cfg: GroupSuiteConfig): void {
|
|
11
|
-
const { addCommand, addTool, logger } = plugin;
|
|
12
|
-
const welcomeTemplate = cfg.welcome;
|
|
13
|
-
const noticeAdapters = cfg.noticeAdapters;
|
|
14
|
-
|
|
15
|
-
plugin.on("notice.receive", async (notice) => {
|
|
16
|
-
if (!adapterAllowed(noticeAdapters, String(notice.$adapter))) return;
|
|
17
|
-
|
|
18
|
-
if (notice.$type === "group_member_increase") {
|
|
19
|
-
if (notice.$channel.type !== "group") return;
|
|
20
|
-
const targetName =
|
|
21
|
-
notice.$target?.name || notice.$target?.id || "新成员";
|
|
22
|
-
const welcomeMsg = `🎉 ${targetName},${welcomeTemplate}`;
|
|
23
|
-
try {
|
|
24
|
-
const adapter = plugin.inject(notice.$adapter as never) as any;
|
|
25
|
-
if (!adapter?.sendMessage) return;
|
|
26
|
-
await adapter.sendMessage({
|
|
27
|
-
context: notice.$adapter,
|
|
28
|
-
endpoint: notice.$endpoint,
|
|
29
|
-
content: welcomeMsg,
|
|
30
|
-
id: notice.$channel.id,
|
|
31
|
-
type: notice.$channel.type,
|
|
32
|
-
});
|
|
33
|
-
} catch (e: unknown) {
|
|
34
|
-
logger.warn(
|
|
35
|
-
formatCompact({
|
|
36
|
-
op: "welcome",
|
|
37
|
-
ok: false,
|
|
38
|
-
error: e instanceof Error ? e.message : String(e),
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (cfg.recallNotify && notice.$type === "group_recall") {
|
|
46
|
-
if (notice.$channel.type !== "group") return;
|
|
47
|
-
const operatorName =
|
|
48
|
-
notice.$operator?.name || notice.$operator?.id || "某人";
|
|
49
|
-
const msg = `⚠️ ${operatorName} 撤回了一条消息`;
|
|
50
|
-
try {
|
|
51
|
-
const adapter = plugin.inject(notice.$adapter as never) as any;
|
|
52
|
-
if (!adapter?.sendMessage) return;
|
|
53
|
-
await adapter.sendMessage({
|
|
54
|
-
context: notice.$adapter,
|
|
55
|
-
endpoint: notice.$endpoint,
|
|
56
|
-
content: msg,
|
|
57
|
-
id: notice.$channel.id,
|
|
58
|
-
type: notice.$channel.type,
|
|
59
|
-
});
|
|
60
|
-
} catch (e: unknown) {
|
|
61
|
-
logger.warn(
|
|
62
|
-
formatCompact({
|
|
63
|
-
op: "recall_notice",
|
|
64
|
-
ok: false,
|
|
65
|
-
error: e instanceof Error ? e.message : String(e),
|
|
66
|
-
}),
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
if (!cfg.keywordReply) return;
|
|
73
|
-
|
|
74
|
-
const keywords = new Map<string, string>();
|
|
75
|
-
|
|
76
|
-
plugin.root.addMiddleware(async (message, next) => {
|
|
77
|
-
if (message.$channel.type !== "group") {
|
|
78
|
-
await next();
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const raw = message.$raw?.trim();
|
|
82
|
-
if (!raw) {
|
|
83
|
-
await next();
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
for (const [keyword, reply] of keywords) {
|
|
87
|
-
if (raw.includes(keyword)) {
|
|
88
|
-
await message.$reply?.(reply);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
await next();
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
addCommand(
|
|
96
|
-
new MessageCommand("添加关键词 <keyword:text> <reply:text>")
|
|
97
|
-
.desc("添加一个关键词自动回复对")
|
|
98
|
-
.action(async (_message, result) => {
|
|
99
|
-
const { keyword, reply } = result.params as {
|
|
100
|
-
keyword: string;
|
|
101
|
-
reply: string;
|
|
102
|
-
};
|
|
103
|
-
if (!keyword || !reply) return "请提供关键词和回复内容";
|
|
104
|
-
keywords.set(keyword, reply);
|
|
105
|
-
return `已添加关键词「${keyword}」→「${reply}」`;
|
|
106
|
-
}),
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
addCommand(
|
|
110
|
-
new MessageCommand("删除关键词 <keyword:text>")
|
|
111
|
-
.desc("删除一个关键词")
|
|
112
|
-
.action(async (_message, result) => {
|
|
113
|
-
const { keyword } = result.params as { keyword: string };
|
|
114
|
-
if (!keyword) return "请提供要删除的关键词";
|
|
115
|
-
if (!keywords.has(keyword)) return `关键词「${keyword}」不存在`;
|
|
116
|
-
keywords.delete(keyword);
|
|
117
|
-
return `已删除关键词「${keyword}」`;
|
|
118
|
-
}),
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
addCommand(
|
|
122
|
-
new MessageCommand("关键词列表")
|
|
123
|
-
.desc("查看所有关键词回复对")
|
|
124
|
-
.action(async () => {
|
|
125
|
-
if (keywords.size === 0) return "当前没有设置任何关键词";
|
|
126
|
-
const lines = Array.from(keywords.entries()).map(
|
|
127
|
-
([k, v], i) => `${i + 1}. 「${k}」→「${v}」`,
|
|
128
|
-
);
|
|
129
|
-
return `关键词列表(共 ${keywords.size} 条):\n${lines.join("\n")}`;
|
|
130
|
-
}),
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
addTool(
|
|
134
|
-
new ZhinTool("group_announce")
|
|
135
|
-
.desc("向群聊发送公告/通知消息")
|
|
136
|
-
.keyword("群公告", "通知", "announce")
|
|
137
|
-
.param("message", { type: "string", description: "要发送的公告内容" }, true)
|
|
138
|
-
.execute(async (args) => {
|
|
139
|
-
const content = args.message as string;
|
|
140
|
-
if (!content?.trim()) return "公告内容不能为空";
|
|
141
|
-
return `📢 群公告:\n${content}`;
|
|
142
|
-
})
|
|
143
|
-
.toTool(),
|
|
144
|
-
);
|
|
145
|
-
}
|
package/src/checkin.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { formatCompact, MessageCommand, type Plugin } from "zhin.js";
|
|
2
|
-
import type { GroupSuiteConfig } from "./config.js";
|
|
3
|
-
import { getDatabase, getMessageContextKey, todayStr, ts } from "./shared.js";
|
|
4
|
-
|
|
5
|
-
function yesterdayStr(): string {
|
|
6
|
-
const d = new Date();
|
|
7
|
-
d.setDate(d.getDate() - 1);
|
|
8
|
-
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function randomInt(min: number, max: number): number {
|
|
12
|
-
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
let _db: any = null;
|
|
16
|
-
|
|
17
|
-
export function getCheckinModel(): any {
|
|
18
|
-
return _db?.models?.get("checkin_records") ?? null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function registerCheckin(plugin: Plugin, cfg: GroupSuiteConfig): void {
|
|
22
|
-
const { logger, addCommand, useContext } = plugin;
|
|
23
|
-
|
|
24
|
-
useContext("database", (db: any) => {
|
|
25
|
-
_db = db;
|
|
26
|
-
db.define("checkin_records", {
|
|
27
|
-
user_id: { type: "text", nullable: false },
|
|
28
|
-
user_name: { type: "text", default: "" },
|
|
29
|
-
points: { type: "integer", default: 0 },
|
|
30
|
-
total_checkins: { type: "integer", default: 0 },
|
|
31
|
-
streak: { type: "integer", default: 0 },
|
|
32
|
-
max_streak: { type: "integer", default: 0 },
|
|
33
|
-
last_checkin: { type: "text", default: "" },
|
|
34
|
-
context_type: { type: "text", default: "global" },
|
|
35
|
-
context_id: { type: "text", default: "" },
|
|
36
|
-
created_at: { type: "text", default: "" },
|
|
37
|
-
updated_at: { type: "text", default: "" },
|
|
38
|
-
});
|
|
39
|
-
logger.info(formatCompact({ 模块: "签到", 数据模型: "已就绪" }));
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
async function getOrCreateUser(
|
|
43
|
-
model: any,
|
|
44
|
-
userId: string,
|
|
45
|
-
userName: string,
|
|
46
|
-
ctxType: string,
|
|
47
|
-
ctxId: string,
|
|
48
|
-
): Promise<Record<string, unknown> | null> {
|
|
49
|
-
const rows = (await model.select().where({
|
|
50
|
-
user_id: userId,
|
|
51
|
-
context_type: ctxType,
|
|
52
|
-
context_id: ctxId,
|
|
53
|
-
})) as Record<string, unknown>[];
|
|
54
|
-
if (rows.length > 0) return rows[0];
|
|
55
|
-
|
|
56
|
-
await model.insert({
|
|
57
|
-
user_id: userId,
|
|
58
|
-
user_name: userName,
|
|
59
|
-
points: 0,
|
|
60
|
-
total_checkins: 0,
|
|
61
|
-
streak: 0,
|
|
62
|
-
max_streak: 0,
|
|
63
|
-
last_checkin: "",
|
|
64
|
-
context_type: ctxType,
|
|
65
|
-
context_id: ctxId,
|
|
66
|
-
created_at: ts(),
|
|
67
|
-
updated_at: ts(),
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const created = (await model.select().where({
|
|
71
|
-
user_id: userId,
|
|
72
|
-
context_type: ctxType,
|
|
73
|
-
context_id: ctxId,
|
|
74
|
-
})) as Record<string, unknown>[];
|
|
75
|
-
return created[0] ?? null;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
addCommand(
|
|
79
|
-
new MessageCommand("checkin")
|
|
80
|
-
.desc("签到", "每日签到获得积分")
|
|
81
|
-
.action(async (message) => {
|
|
82
|
-
const M = getCheckinModel();
|
|
83
|
-
if (!M) return "签到数据库尚未就绪,请稍后重试";
|
|
84
|
-
|
|
85
|
-
const userId = String(message.$sender?.id || "");
|
|
86
|
-
const userName = String(message.$sender?.name || "用户");
|
|
87
|
-
if (!userId) return "无法获取用户信息";
|
|
88
|
-
|
|
89
|
-
const { type: ctxType, id: ctxId } = getMessageContextKey(message);
|
|
90
|
-
const user = await getOrCreateUser(M, userId, userName, ctxType, ctxId);
|
|
91
|
-
if (!user) return "签到失败,请重试";
|
|
92
|
-
|
|
93
|
-
const today = todayStr();
|
|
94
|
-
if (user.last_checkin === today) {
|
|
95
|
-
return `你今天已经签到过了哦~\n当前积分: ${user.points}\n连续签到: ${user.streak} 天`;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const isConsecutive = user.last_checkin === yesterdayStr();
|
|
99
|
-
const newStreak = isConsecutive ? Number(user.streak) + 1 : 1;
|
|
100
|
-
const base = randomInt(cfg.basePointsMin, cfg.basePointsMax);
|
|
101
|
-
const bonus = Math.min(newStreak * cfg.streakBonus, cfg.streakCap);
|
|
102
|
-
const earned = base + bonus;
|
|
103
|
-
const newPoints = Number(user.points || 0) + earned;
|
|
104
|
-
|
|
105
|
-
await M.update({
|
|
106
|
-
points: newPoints,
|
|
107
|
-
total_checkins: Number(user.total_checkins || 0) + 1,
|
|
108
|
-
streak: newStreak,
|
|
109
|
-
max_streak: Math.max(Number(user.max_streak || 0), newStreak),
|
|
110
|
-
last_checkin: today,
|
|
111
|
-
user_name: userName,
|
|
112
|
-
updated_at: ts(),
|
|
113
|
-
}).where({
|
|
114
|
-
user_id: userId,
|
|
115
|
-
context_type: ctxType,
|
|
116
|
-
context_id: ctxId,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const lines = [`签到成功!`, `基础积分: +${base}`];
|
|
120
|
-
if (bonus > 0) lines.push(`连续奖励: +${bonus} (连续${newStreak}天)`);
|
|
121
|
-
lines.push(`本次获得: +${earned}`, `当前积分: ${newPoints}`);
|
|
122
|
-
return lines.join("\n");
|
|
123
|
-
}),
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
addCommand(
|
|
127
|
-
new MessageCommand("mypoints")
|
|
128
|
-
.desc("我的积分", "查看个人积分与签到信息")
|
|
129
|
-
.action(async (message) => {
|
|
130
|
-
const M = getCheckinModel();
|
|
131
|
-
if (!M) return "签到数据库尚未就绪";
|
|
132
|
-
const userId = String(message.$sender?.id || "");
|
|
133
|
-
const { type: ctxType, id: ctxId } = getMessageContextKey(message);
|
|
134
|
-
const rows = (await M.select().where({
|
|
135
|
-
user_id: userId,
|
|
136
|
-
context_type: ctxType,
|
|
137
|
-
context_id: ctxId,
|
|
138
|
-
})) as Record<string, unknown>[];
|
|
139
|
-
if (rows.length === 0) return "你还没有签到记录哦,发送「签到」开始吧!";
|
|
140
|
-
const u = rows[0];
|
|
141
|
-
const checkedToday = u.last_checkin === todayStr();
|
|
142
|
-
return [
|
|
143
|
-
`${u.user_name || "用户"} 的积分信息`,
|
|
144
|
-
`积分: ${u.points}`,
|
|
145
|
-
`累计签到: ${u.total_checkins} 天`,
|
|
146
|
-
`连续签到: ${u.streak} 天`,
|
|
147
|
-
`最长连续: ${u.max_streak} 天`,
|
|
148
|
-
checkedToday ? "今日已签到 ✓" : "今日未签到",
|
|
149
|
-
].join("\n");
|
|
150
|
-
}),
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
addCommand(
|
|
154
|
-
new MessageCommand("rank")
|
|
155
|
-
.desc("积分排行", "查看积分排行榜")
|
|
156
|
-
.action(async (message) => {
|
|
157
|
-
const M = getCheckinModel();
|
|
158
|
-
if (!M) return "签到数据库尚未就绪";
|
|
159
|
-
const { type: ctxType, id: ctxId } = getMessageContextKey(message);
|
|
160
|
-
const all = (await M.select().where(
|
|
161
|
-
ctxType === "global"
|
|
162
|
-
? { context_type: "global" }
|
|
163
|
-
: { context_type: ctxType, context_id: ctxId },
|
|
164
|
-
)) as Record<string, unknown>[];
|
|
165
|
-
if (all.length === 0) return "还没有人签到过哦~";
|
|
166
|
-
const sorted = all.sort(
|
|
167
|
-
(a, b) => Number(b.points || 0) - Number(a.points || 0),
|
|
168
|
-
);
|
|
169
|
-
const top = sorted.slice(0, cfg.rankSize);
|
|
170
|
-
const medals = ["🥇", "🥈", "🥉"];
|
|
171
|
-
const lines = top.map((u, i) => {
|
|
172
|
-
const prefix = i < 3 ? medals[i] : `${i + 1}.`;
|
|
173
|
-
return `${prefix} ${u.user_name || u.user_id} — ${u.points}分 (${u.total_checkins}天)`;
|
|
174
|
-
});
|
|
175
|
-
const title = ctxType === "group" ? "本群积分排行" : "全局积分排行";
|
|
176
|
-
const userId = String(message.$sender?.id || "");
|
|
177
|
-
const myRank = sorted.findIndex((u) => u.user_id === userId);
|
|
178
|
-
const footer = myRank >= 0 ? `\n你的排名: 第${myRank + 1}名` : "";
|
|
179
|
-
return `${title}\n${lines.join("\n")}${footer}`;
|
|
180
|
-
}),
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
if (!_db) {
|
|
184
|
-
const db = getDatabase(plugin);
|
|
185
|
-
if (db) _db = db;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
logger.info(
|
|
189
|
-
formatCompact({
|
|
190
|
-
模块: "签到",
|
|
191
|
-
状态: "已加载",
|
|
192
|
-
基础积分最小值: cfg.basePointsMin,
|
|
193
|
-
基础积分最大值: cfg.basePointsMax,
|
|
194
|
-
}),
|
|
195
|
-
);
|
|
196
|
-
}
|