koishi-plugin-ll-schedule 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.
Files changed (2) hide show
  1. package/index.js +8 -17
  2. package/package.json +2 -1
package/index.js CHANGED
@@ -48,7 +48,7 @@ exports.usage = `定时提醒插件:到时间自动向订阅了该任务的群
48
48
 
49
49
  ## Markdown 卡片(官方QQ机器人)
50
50
 
51
- 任务勾选 \`markdown\` 后,会用 QQ 官方 Markdown 卡片发送(仅官机生效,失败自动回退纯文本;其他平台始终纯文本)。内容里可用标题/加粗/引用/链接/图片,模板变量自动替换。任务填 \`image\` 图片 URL 也会随消息发出(markdown 模式自动嵌入)。
51
+ 任务勾选 \`markdown\` 后,会用 QQ 官方 Markdown 卡片发送(仅官机生效,失败自动回退纯文本;其他平台始终纯文本)。内容里可用标题/加粗/引用/链接/图片(图片直接写在内容里,如 \`![配图](https://...)\`),模板变量自动替换。
52
52
 
53
53
  ## 其他配置
54
54
 
@@ -228,9 +228,6 @@ const TaskItem = Schema.object({
228
228
  markdown: Schema.boolean()
229
229
  .default(false)
230
230
  .description('用 QQ官方 Markdown 卡片发送(仅官方QQ机器人生效,失败自动回退纯文本;其他平台始终纯文本)'),
231
- image: Schema.string()
232
- .default('')
233
- .description('图片 URL(可选):随内容一起发送(markdown 模式自动嵌入为图片)'),
234
231
  enabled: Schema.boolean()
235
232
  .default(true)
236
233
  .description('是否启用'),
@@ -240,12 +237,6 @@ const Config = Schema.object({
240
237
  tasks: Schema.dict(TaskItem)
241
238
  .default({})
242
239
  .description('📋 推送任务表格(键=任务名;每个任务 = 时间段列表:星期/时间/内容)'),
243
- subscribeKeyword: Schema.string()
244
- .default('订阅')
245
- .description('群内订阅推送的关键词(如"订阅 任务名",只输关键词则订阅唯一启用的任务)'),
246
- unsubscribeKeyword: Schema.string()
247
- .default('取消订阅')
248
- .description('群内取消订阅的关键词(如"取消订阅 任务名")'),
249
240
  subscribeAuthority: Schema.number()
250
241
  .min(1).max(4).default(1)
251
242
  .description('执行订阅命令所需的最低权限等级(Koishi 用户权限等级,与QQ群主/管理员身份无关;默认 1=所有人都能订阅。如需限制,先在控制台"用户管理"给指定账号提权,再调高此值)'),
@@ -604,8 +595,8 @@ function apply(ctx, config) {
604
595
  .action(() => {
605
596
  logger.info('[schedule] 命令被调用: schedule')
606
597
  return '⚙️ 管理:插件设置页 → ll-schedule → tasks 添加任务和时间段(星期/时间/内容)\n' +
607
- `群内发"${config.subscribeKeyword} 任务名"即可让本群订阅推送\n` +
608
- `命令:${config.subscribeKeyword} | ${config.unsubscribeKeyword} | 订阅列表 | schedule.list | schedule.groups | schedule.test <任务名>`
598
+ `群内发"订阅 任务名"即可让本群订阅推送\n` +
599
+ `命令:订阅 | 取消订阅 | 订阅列表 | schedule.list | schedule.groups | schedule.test <任务名>`
609
600
  })
610
601
 
611
602
  ctx.command('schedule.list', '查看定时任务')
@@ -709,7 +700,7 @@ function apply(ctx, config) {
709
700
  return `✅ 本群已取消订阅任务 "${name}"`
710
701
  }
711
702
 
712
- ctx.command(config.subscribeKeyword + ' [taskName:text]', '让当前群订阅指定任务的推送')
703
+ ctx.command('订阅 [taskName:text]', '让当前群订阅指定任务的推送')
713
704
  .action(async ({ session }, taskName) => {
714
705
  if (!(await checkSubscribePerm(session))) return permDeniedHint()
715
706
  return await subscribeCurrentGroup(session, taskName)
@@ -721,7 +712,7 @@ function apply(ctx, config) {
721
712
  return await subscribeCurrentGroup(session, taskName)
722
713
  })
723
714
 
724
- ctx.command(config.unsubscribeKeyword + ' [taskName:text]', '让当前群取消订阅指定任务的推送')
715
+ ctx.command('取消订阅 [taskName:text]', '让当前群取消订阅指定任务的推送')
725
716
  .action(async ({ session }, taskName) => {
726
717
  if (!(await checkSubscribePerm(session))) return permDeniedHint()
727
718
  return await unsubscribeCurrentGroup(session, taskName)
@@ -736,7 +727,7 @@ function apply(ctx, config) {
736
727
  ctx.command('订阅列表', '查看所有任务的订阅群')
737
728
  .action(async () => {
738
729
  logger.info('[schedule] 命令被调用: 订阅列表')
739
- if (!subs.size) return '暂无任何群订阅。群内发"' + config.subscribeKeyword + ' 任务名"即可订阅'
730
+ if (!subs.size) return '暂无任何群订阅。群内发"订阅 任务名"即可订阅'
740
731
  const lines = []
741
732
  for (const [taskName, taskSubs] of subs) {
742
733
  const entries = [...taskSubs.values()]
@@ -753,7 +744,7 @@ function apply(ctx, config) {
753
744
  ctx.command('lls.sublist', '查看订阅列表(备用入口)')
754
745
  .action(async () => {
755
746
  logger.info('[schedule] 命令被调用: lls.sublist')
756
- if (!subs.size) return '暂无任何群订阅。群内发"' + config.subscribeKeyword + ' 任务名"即可订阅'
747
+ if (!subs.size) return '暂无任何群订阅。群内发"订阅 任务名"即可订阅'
757
748
  const lines = []
758
749
  for (const [taskName, taskSubs] of subs) {
759
750
  const entries = [...taskSubs.values()]
@@ -828,7 +819,7 @@ function apply(ctx, config) {
828
819
  })
829
820
 
830
821
  logger.info('[schedule] 命令已注册: schedule / schedule.list / schedule.groups / schedule.test / ' +
831
- `"${config.subscribeKeyword}" / "${config.unsubscribeKeyword}" / 订阅列表 / lls.*`)
822
+ `"订阅" / "取消订阅" / 订阅列表 / lls.*`)
832
823
 
833
824
  Promise.all([loadKnownGroups(), loadSubs()]).then(() => checkAndSend())
834
825
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-ll-schedule",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Scheduled message sender with weekly slots (per-day time & content), QQ official markdown card support",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -19,3 +19,4 @@
19
19
  }
20
20
  }
21
21
 
22
+