koishi-plugin-maple-schedule 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.js +2 -4
- package/package.json +1 -1
- package/lib/index.d.ts +0 -28
package/lib/index.js
CHANGED
|
@@ -328,8 +328,7 @@ ${task.content}`;
|
|
|
328
328
|
return `定时任务创建成功!
|
|
329
329
|
任务ID: #${newTask.id}
|
|
330
330
|
任务类型: ${taskType}
|
|
331
|
-
执行时间: ${timeDisplay}${intervalDisplay}
|
|
332
|
-
任务内容: ${trimmedContent}`;
|
|
331
|
+
执行时间: ${timeDisplay}${intervalDisplay}`;
|
|
333
332
|
} catch (error) {
|
|
334
333
|
ctx.logger("maple-schedule").error("创建定时任务时出错:", error);
|
|
335
334
|
return "创建定时任务时出错了,请稍后再试。";
|
|
@@ -409,8 +408,7 @@ ${task.content}`;
|
|
|
409
408
|
ctx.logger("maple-schedule").info(`用户 ${session.userId} 删除了定时任务 #${id}`);
|
|
410
409
|
await ctx.database.remove("maple-schedule-tasks", { id });
|
|
411
410
|
return `已成功删除定时任务 #${id}
|
|
412
|
-
执行时间: ${timeDisplay}
|
|
413
|
-
任务内容: ${contentPreview}`;
|
|
411
|
+
执行时间: ${timeDisplay}`;
|
|
414
412
|
} catch (error) {
|
|
415
413
|
ctx.logger("maple-schedule").error("删除定时任务时出错:", error);
|
|
416
414
|
return "删除定时任务时出错了,请稍后再试。";
|
package/package.json
CHANGED
package/lib/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Context, Schema } from 'koishi';
|
|
2
|
-
export declare const name = "maple-schedule";
|
|
3
|
-
export declare const using: readonly ["database"];
|
|
4
|
-
interface ScheduleTask {
|
|
5
|
-
id: number;
|
|
6
|
-
platform: string;
|
|
7
|
-
botId: string;
|
|
8
|
-
channelId: string | null;
|
|
9
|
-
userId: string;
|
|
10
|
-
content: string;
|
|
11
|
-
nextExecutionTime: Date;
|
|
12
|
-
intervalMs: number | null;
|
|
13
|
-
}
|
|
14
|
-
declare module 'koishi' {
|
|
15
|
-
interface Tables {
|
|
16
|
-
'maple-schedule-tasks': ScheduleTask;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export interface Config {
|
|
20
|
-
maxContentLength: number;
|
|
21
|
-
maxPreviewLength: number;
|
|
22
|
-
sendInterval: number;
|
|
23
|
-
scanInterval: number;
|
|
24
|
-
timeTolerance: number;
|
|
25
|
-
}
|
|
26
|
-
export declare const Config: Schema<Config>;
|
|
27
|
-
export declare function apply(ctx: Context, config: Config): void;
|
|
28
|
-
export {};
|