shawenguan il y a 1 an
Parent
commit
ee609956a9
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      Scripts/wubian/wubianOthersCollectList.js

+ 11 - 0
Scripts/wubian/wubianOthersCollectList.js

@@ -121,6 +121,16 @@ function getOthersHashIdByName(name) {
     }
 }
 
+function printAllOthersNickName() {
+    let msgText = '以下是当前收录的所有用户昵称:\n';
+    let data = magicJS.data.read(WuBianConstKey.AllUserSimpleInfo, null);
+    for (let hashId in data) {
+        let nickName = data[hashId]?.nickName
+        msgText += `${nickName}(${hashId}) `;
+    }
+    magicJS.logger.info(msgText);
+}
+
 async function tryCheckCollectList() {
     let othersHashId = magicJS.data.read(WuBianConstKey.QueryOthersCollectHashId, null);
     let nickName = null;
@@ -131,6 +141,7 @@ async function tryCheckCollectList() {
     }
     if (!othersHashId) {
         magicJS.notification.appendNotifyInfo(`当前没有设置查询用户hashId或者用户昵称,请先设置!`);
+        printAllOthersNickName();
         return;
     }
     if (!nickName) {