koishi-plugin-clock
Advanced tools
Comparing version 0.0.1 to 0.0.2
import { Context, Schema } from 'koishi'; | ||
export declare const using: string[]; | ||
export declare const name = "clock"; | ||
export declare const usage = "\n### [Allowed fields](https://github.com/node-cron/node-cron)\n\n```\n # \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 second (optional)\n # \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute\n # \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour\n # \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of month\n # \u2502 \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500 month\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500 day of week\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\n # * * * * * *\n```\n\n### Allowed values\n\n| field | value |\n|--------------|---------------------|\n| second | 0-59 |\n| minute | 0-59 |\n| hour | 0-23 |\n| day of month | 1-31 |\n| month | 1-12 (or names) |\n| day of week | 0-7 (or names, 0 or 7 are sunday) |\n\n\n"; | ||
export declare const usage = "\n### [Allowed fields](https://github.com/node-cron/node-cron)\n\n```\n # \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 second (optional)\n # \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute\n # \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour\n # \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of month\n # \u2502 \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500 month\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u250C\u2500\u2500\u2500\u2500 day of week\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\n # \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\n # * * * * * *\n```\n\n### Allowed values\n\n| field | value |\n|--------------|---------------------|\n| second | 0-59 |\n| minute | 0-59 |\n| hour | 0-23 |\n| day of month | 1-31 |\n| month | 1-12 (or names) |\n| day of week | 0-7 (or names, 0 or 7 are sunday) |\n\n### \u6CE8\u610F\u4E8B\u9879\n\u5FC5\u987B\u586B\u5199\u63A8\u9001\u89C4\u5219\uFF0C\u5426\u5219\u4E0D\u80FD\u53D1\u9001\u6D88\u606F\n#### \u793A\u4F8B\uFF1A\nplatform: onebot // \u5E73\u53F0\u540D\u79F0\nchannelId: '399899914' // \u7FA4\u53F7\nguildId: '399899914' // \u7FA4\u53F7\nselfId: '1114039391' // \u673A\u5668\u4EBA\u7684qq\u53F7\n\n### \u793A\u4F8B\n```\n\u5728\u5DE5\u4F5C\u65E5 17:30 \u53D1\u9001\u4E0B\u73ED\u4E86\nclock 0 30 17 * * 1,2,3,4,5\n\u5728\u6BCF\u5929 00:00 \u53D1\u9001\u665A\u5B89\nclock 0 0 0 * * *\n\u5728\u6BCF\u5929\u65E9\u4E0A 8:00 \u53D1\u9001\u65E9\u5B89\ncloak 0 0 8 * * * \n```\n\n"; | ||
export interface Time { | ||
@@ -6,0 +6,0 @@ hours: number; |
@@ -34,3 +34,20 @@ "use strict"; | ||
### 注意事项 | ||
必须填写推送规则,否则不能发送消息 | ||
#### 示例: | ||
platform: onebot // 平台名称 | ||
channelId: '399899914' // 群号 | ||
guildId: '399899914' // 群号 | ||
selfId: '1114039391' // 机器人的qq号 | ||
### 示例 | ||
\`\`\` | ||
在工作日 17:30 发送下班了 | ||
clock 0 30 17 * * 1,2,3,4,5 | ||
在每天 00:00 发送晚安 | ||
clock 0 0 0 * * * | ||
在每天早上 8:00 发送早安 | ||
cloak 0 0 8 * * * | ||
\`\`\` | ||
`; | ||
@@ -78,3 +95,3 @@ exports.Rule = koishi_1.Schema.object({ | ||
}); | ||
ctx.command('clock.s [id:number]', "列出所有闹钟", { checkArgCount: true }).action(async ({ session }, id) => { | ||
ctx.command('clock.s [id:number]', "关闭/启动闹钟", { checkArgCount: true }).action(async ({ session }, id) => { | ||
return clock_switch(ctx, session, id); | ||
@@ -81,0 +98,0 @@ }); |
{ | ||
"name": "koishi-plugin-clock", | ||
"description": "闹钟插件", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
@@ -33,1 +33,18 @@ # koishi-plugin-clock | ||
### 注意事项 | ||
必须填写推送规则,否则不能发送消息 | ||
#### 示例: | ||
platform: onebot // 平台名称 | ||
channelId: '399899914' // 群号 | ||
guildId: '399899914' // 群号 | ||
selfId: '1114039391' // 机器人的qq号 | ||
### 示例 | ||
\`\`\` | ||
在工作日 17:30 发送下班了 | ||
clock 0 30 17 * * 1,2,3,4,5 | ||
在每天 00:00 发送晚安 | ||
clock 0 0 0 * * * | ||
在每天早上 8:00 发送早安 | ||
cloak 0 0 8 * * * | ||
\`\`\` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10085
189
49