Ver código fonte

amend help command

Mike L 3 anos atrás
pai
commit
743eefd250
3 arquivos alterados com 7 adições e 5 exclusões
  1. 1 1
      dist/koishi.js
  2. 5 3
      dist/twitter.js
  3. 1 1
      src/koishi.ts

+ 1 - 1
dist/koishi.js

@@ -198,7 +198,7 @@ class default_1 {
 /instagram - 查询当前聊天中的 Instagram 动态订阅
 /instagram_subscribe〈链接|用户名〉- 订阅 Instagram 媒体搬运
 /instagram_unsubscribe〈链接|用户名〉- 退订 Instagram 媒体搬运
-/instagram_view〈链接〉- 查看媒体
+/instagram_view〈链接|用户名〉- 查看媒体\
 ${chat.chatType === "temp" ?
                                 '\n(当前游客模式下无法使用订阅功能,请先添加本账号为好友。)' : ''}`);
                         }

+ 5 - 3
dist/twitter.js

@@ -323,12 +323,14 @@ class default_1 {
             const currentFeed = lock.feed[lock.workon];
             const promise = new Promise(resolve => {
                 const match = /https:\/\/www\.instagram\.com\/([^\/]+)/.exec(currentFeed);
-                if (!match)
-                    resolve([]);
+                if (!match) {
+                    logger.error(`current feed "${currentFeed}" is invalid, please remove this feed manually`);
+                    return resolve([]);
+                }
                 this.queryUserMedia(match[1], this.lock.threads[currentFeed].offset)
                     .then(resolve)
                     .catch((error) => {
-                    console.error(`error scraping media off profile page of ${match[1]}, error: ${error}`);
+                    logger.error(`error scraping media off profile page of ${match[1]}, error: ${error}`);
                     resolve([]);
                 });
             });

+ 1 - 1
src/koishi.ts

@@ -218,7 +218,7 @@ export default class {
 /instagram - 查询当前聊天中的 Instagram 动态订阅
 /instagram_subscribe〈链接|用户名〉- 订阅 Instagram 媒体搬运
 /instagram_unsubscribe〈链接|用户名〉- 退订 Instagram 媒体搬运
-/instagram_view〈链接〉- 查看媒体
+/instagram_view〈链接|用户名〉- 查看媒体\
 ${chat.chatType === ChatType.Temp ?
     '\n(当前游客模式下无法使用订阅功能,请先添加本账号为好友。)' : ''
 }`);