diff --git a/channels/isekaiwiki/admin/autoReview.yml b/channels/isekaiwiki/admin/autoReview.yml index 0b15b1e..25ebaa9 100644 --- a/channels/isekaiwiki/admin/autoReview.yml +++ b/channels/isekaiwiki/admin/autoReview.yml @@ -1,11 +1,11 @@ -name: 自动审核通过 -provider: pusher -source: - service: pusher - channel: isekaiwiki - type: autoReview -tpl: - default: |- - {{{author}}} 更新了新页面: {{{title}}} - {{{summary}}} - {{{result}}} +name: 自动审核通过 +provider: pusher +source: + service: pusher + channel: isekaiwiki + type: autoReview +tpl: + default: |- + {{{author}}} 更新了新页面: {{{title}}} + {{{summary}}} + {{{result}}} diff --git a/channels/isekaiwiki/admin/needReview.yml b/channels/isekaiwiki/admin/needReview.yml index 22f3867..c53d9cc 100644 --- a/channels/isekaiwiki/admin/needReview.yml +++ b/channels/isekaiwiki/admin/needReview.yml @@ -1,12 +1,12 @@ -name: 待审页面 -provider: pusher -source: - service: pusher - channel: isekaiwiki - type: needReview -tpl: - default: |- - Review队列中增加了新页面: - 编辑者: {{{author}}} - 标题: {{{title}}} - {{{summary}}} +name: 待审页面 +provider: pusher +source: + service: pusher + channel: isekaiwiki + type: needReview +tpl: + default: |- + Review队列中增加了新页面: + 编辑者: {{{author}}} + 标题: {{{title}}} + {{{summary}}} diff --git a/channels/isekaiwiki/editPage.yml b/channels/isekaiwiki/editPage.yml index 7bbfd2c..05b3cb3 100644 --- a/channels/isekaiwiki/editPage.yml +++ b/channels/isekaiwiki/editPage.yml @@ -1,11 +1,11 @@ -name: 修改页面 -provider: pusher -source: - service: pusher - channel: isekaiwiki - type: edit -tpl: - default: |- - {{{author}}} 更新了页面《{{{title}}}》: - {{{summary}}} - {{{url}}} +name: 修改页面 +provider: pusher +source: + service: pusher + channel: isekaiwiki + type: edit +tpl: + default: |- + {{{author}}} 更新了页面: {{{title}}} + {{{summary}}} + {{{url}}} \ No newline at end of file diff --git a/channels/isekaiwiki/newPage.yml b/channels/isekaiwiki/newPage.yml index c6eab36..e6b4986 100644 --- a/channels/isekaiwiki/newPage.yml +++ b/channels/isekaiwiki/newPage.yml @@ -1,12 +1,11 @@ -name: 新页面 -provider: pusher -source: - service: pusher - channel: isekaiwiki - type: new -tpl: - default: |- - {{{author}}} 创建了新页面《{{{title}}}》: - {{{summary}}} - - {{{url}}} +name: 新页面 +provider: pusher +source: + service: pusher + channel: isekaiwiki + type: new +tpl: + default: |- + {{{author}}} 创建了新页面: {{{title}}} + {{{summary}}} + {{{url}}} diff --git a/src/RobotManager.ts b/src/RobotManager.ts index 6a7cc77..7b13a52 100644 --- a/src/RobotManager.ts +++ b/src/RobotManager.ts @@ -93,7 +93,7 @@ export class RobotManager { } try { - robot.sendMessage(targets, currentMsg); + await robot.sendMessage(targets, currentMsg); } catch(err) { console.error(`[${channelId}] 无法发送消息到 ${robotId} : `, err); } diff --git a/src/Setup.ts b/src/Setup.ts index cc66384..6c54812 100644 --- a/src/Setup.ts +++ b/src/Setup.ts @@ -10,8 +10,9 @@ export class Setup { let maxLength: any = parseInt(args[1]); let ellipsis: any = undefined; if (args.length > 3) { - return Utils.excerpt(text, parseInt(maxLength), ellipsis); + ellipsis = args[2]; } + return Utils.excerpt(text, parseInt(maxLength), ellipsis); } return args[0]; }); diff --git a/src/robot/QQRobot.ts b/src/robot/QQRobot.ts index f55a8f8..28a930c 100644 --- a/src/robot/QQRobot.ts +++ b/src/robot/QQRobot.ts @@ -45,9 +45,8 @@ export default class QQRobot implements Robot { } return await this.doApiRequest('send_private_msg', { - bot_id: this.botQQ, user_id: user, - message: message, + message: message }); } @@ -64,9 +63,8 @@ export default class QQRobot implements Robot { } return await this.doApiRequest('send_group_msg', { - bot_id: this.botQQ, group_id: group, - message: message, + message: message }); } diff --git a/subscribe-example.yml b/subscribe-example.yml index 3c237b9..0e76668 100644 --- a/subscribe-example.yml +++ b/subscribe-example.yml @@ -1,9 +1,9 @@ qq: user: 1234567890: - - some_channel_group/* + - some_channel_group # 订阅频道组会订阅下一级的全部频道,但是不会订阅更深层级的频道 - some_channel_group2/some_channel group: 1234567890: - - some_channel_group/* + - some_channel_group - some_channel_group2/some_channel