koishi-plugin-best-cave 1.3.1 → 1.3.3
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 +2 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -678,8 +678,10 @@ var HashStorage = class _HashStorage {
|
|
|
678
678
|
imgBuffers.map((buffer) => ImageHasher.calculateHash(buffer))
|
|
679
679
|
);
|
|
680
680
|
this.hashes.set(caveId, hashes);
|
|
681
|
+
logger3.info(`Added ${hashes.length} hashes for cave ${caveId}`);
|
|
681
682
|
} else {
|
|
682
683
|
this.hashes.delete(caveId);
|
|
684
|
+
logger3.info(`Deleted hashes for cave ${caveId}`);
|
|
683
685
|
}
|
|
684
686
|
await this.saveHashes();
|
|
685
687
|
} catch (error) {
|
|
@@ -870,10 +872,6 @@ var HashStorage = class _HashStorage {
|
|
|
870
872
|
logger3.error(`Failed to process cave ${cave.cave_id}: ${error.message}`);
|
|
871
873
|
}
|
|
872
874
|
}
|
|
873
|
-
if (updatedCount > 0) {
|
|
874
|
-
await this.saveHashes();
|
|
875
|
-
logger3.info(`Updated ${updatedCount} new hashes`);
|
|
876
|
-
}
|
|
877
875
|
}
|
|
878
876
|
/**
|
|
879
877
|
* 批量处理数组项
|