koishi-plugin-subscription 0.0.4 → 0.0.5
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 +3 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -257,7 +257,7 @@ var SubscriptionService = class extends import_koishi.Service {
|
|
|
257
257
|
return `${channel.platform}:${channel.id}`;
|
|
258
258
|
}
|
|
259
259
|
registerCommands(ctx, config) {
|
|
260
|
-
const sub = ctx.command("subscription <app:string> [...accounts]", "
|
|
260
|
+
const sub = ctx.command("subscription <app:string> [...accounts]", "添加订阅,格式:订阅 <应用名> <账号>").alias("订阅").alias("添加订阅").userFields(["authority"]).example("推特订阅 爱美").example("订阅 twitter aimi_sound").action(async ({ session, options }, app, ...accounts) => {
|
|
261
261
|
if (!await this.authCheck(session, config)) {
|
|
262
262
|
return "权限不足";
|
|
263
263
|
}
|
|
@@ -281,7 +281,7 @@ var SubscriptionService = class extends import_koishi.Service {
|
|
|
281
281
|
}
|
|
282
282
|
return result;
|
|
283
283
|
});
|
|
284
|
-
const unsub = ctx.command("subscription.remove <app:string> <account:string>", "删除订阅").alias("删除订阅").alias("取消订阅").userFields(["authority"]).action(async ({ session, options }, app, account) => {
|
|
284
|
+
const unsub = ctx.command("subscription.remove <app:string> <account:string>", "删除订阅").alias("删除订阅").alias("取消订阅").userFields(["authority"]).example("取消推特订阅 爱美").example("取消订阅 twitter aimi_sound").action(async ({ session, options }, app, account) => {
|
|
285
285
|
if (!await this.authCheck(session, config)) {
|
|
286
286
|
return "权限不足";
|
|
287
287
|
}
|
|
@@ -333,9 +333,7 @@ var SubscriptionService = class extends import_koishi.Service {
|
|
|
333
333
|
}));
|
|
334
334
|
}
|
|
335
335
|
if (!ctx.puppeteer) {
|
|
336
|
-
let result =
|
|
337
|
-
|
|
338
|
-
`;
|
|
336
|
+
let result = ``;
|
|
339
337
|
for (const app in availableAccounts) {
|
|
340
338
|
result += `【${app}】
|
|
341
339
|
`;
|
|
@@ -564,7 +562,6 @@ var SubscriptionService = class extends import_koishi.Service {
|
|
|
564
562
|
<div class="container">
|
|
565
563
|
<div class="header">
|
|
566
564
|
<h1>订阅状态总览</h1>
|
|
567
|
-
<div class="subtitle">群组 ID: ${groupId}</div>
|
|
568
565
|
</div>
|
|
569
566
|
|
|
570
567
|
<div class="apps-container">
|