koishi-plugin-ll-schedule 1.0.6 → 1.0.8
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/index.js +29 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ exports.usage = `定时发送插件:设置时间自动向指定群发送文字
|
|
|
32
32
|
- \`schedule.test <任务名>\`:立即测试发送
|
|
33
33
|
- \`lls.*\`:以上命令的备用入口(lls.sub / lls.unsub / lls.sublist / lls.list / lls.test)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
订阅/取消订阅所需权限等级在设置页 \`subscribeAuthority\` 调整(默认 1=所有人都能订阅;Koishi 的权限等级是独立的用户权限体系,与QQ群主/管理员身份无关)。
|
|
36
36
|
|
|
37
37
|
## 官机(官方QQ机器人)说明
|
|
38
38
|
|
|
@@ -65,8 +65,8 @@ const Config = Schema.object({
|
|
|
65
65
|
.default('取消订阅')
|
|
66
66
|
.description('群内取消订阅的关键词(如"取消订阅 任务名")'),
|
|
67
67
|
subscribeAuthority: Schema.number()
|
|
68
|
-
.min(1).max(4).default(
|
|
69
|
-
.description('
|
|
68
|
+
.min(1).max(4).default(1)
|
|
69
|
+
.description('执行订阅命令所需的最低权限等级(Koishi 用户权限等级,与QQ群主/管理员身份无关;默认 1=所有人都能订阅。如需限制,先在控制台"用户管理"给指定账号提权,再调高此值)'),
|
|
70
70
|
sendAllWhenEmpty: Schema.boolean()
|
|
71
71
|
.default(true)
|
|
72
72
|
.description('任务未指定群也没有群订阅时,发送给该机器人所有已知群'),
|
|
@@ -526,6 +526,32 @@ function apply(ctx, config) {
|
|
|
526
526
|
return '📋 订阅列表:\n' + lines.join('\n')
|
|
527
527
|
})
|
|
528
528
|
|
|
529
|
+
ctx.command('我的ID', '查看自己的账号信息(openid/群ID)')
|
|
530
|
+
.action(({ session }) => {
|
|
531
|
+
logger.info('[schedule] 命令被调用: 我的ID')
|
|
532
|
+
const lines = [
|
|
533
|
+
'👤 我的账号信息:',
|
|
534
|
+
`平台:${session.platform}`,
|
|
535
|
+
`用户ID:${session.userId}`,
|
|
536
|
+
]
|
|
537
|
+
if (session.guildId) lines.push(`当前群ID:${session.guildId}`)
|
|
538
|
+
if (session.channelId && session.channelId !== session.guildId) lines.push(`频道ID:${session.channelId}`)
|
|
539
|
+
return lines.join('\n')
|
|
540
|
+
})
|
|
541
|
+
|
|
542
|
+
ctx.command('lls.me', '查看自己的账号信息(备用入口)')
|
|
543
|
+
.action(({ session }) => {
|
|
544
|
+
logger.info('[schedule] 命令被调用: lls.me')
|
|
545
|
+
const lines = [
|
|
546
|
+
'👤 我的账号信息:',
|
|
547
|
+
`平台:${session.platform}`,
|
|
548
|
+
`用户ID:${session.userId}`,
|
|
549
|
+
]
|
|
550
|
+
if (session.guildId) lines.push(`当前群ID:${session.guildId}`)
|
|
551
|
+
if (session.channelId && session.channelId !== session.guildId) lines.push(`频道ID:${session.channelId}`)
|
|
552
|
+
return lines.join('\n')
|
|
553
|
+
})
|
|
554
|
+
|
|
529
555
|
// 备用命令入口(避免与其他插件的 schedule 命令冲突)
|
|
530
556
|
ctx.command('lls', 'll-schedule 管理(备用入口)')
|
|
531
557
|
.action(() => {
|