mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-15 03:23:22 +08:00
@@ -56,6 +56,8 @@ let username = settings.username || "default";
|
||||
const content = file.readTextSync("codes.txt");
|
||||
const codes = content.split("\n");
|
||||
|
||||
let count = 0;
|
||||
|
||||
for (let i = 0; i < codes.length; i++) {
|
||||
const line = codes[i].trim();
|
||||
if (!line) continue;
|
||||
@@ -76,7 +78,7 @@ let username = settings.username || "default";
|
||||
|
||||
// 跳过已兑换的
|
||||
if (redeemedCodes.has(code)) {
|
||||
log.info(`检测到${redeemedCodes.size}个兑换码已兑换过,跳过`);
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -149,6 +151,9 @@ let username = settings.username || "default";
|
||||
|
||||
await sleep(4000);
|
||||
}
|
||||
if (count > 0) {
|
||||
log.info(`检测到${count}个兑换码已兑换过,跳过`);
|
||||
}
|
||||
} catch (error) {
|
||||
log.error(`读取兑换码文件失败: ${error}`);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "自动使用兑换码",
|
||||
"version": "6.0.3",
|
||||
"version": "6.0.4",
|
||||
"bgi_version": "0.45.0",
|
||||
"description": "仅支持国服",
|
||||
"authors": [
|
||||
|
||||
Reference in New Issue
Block a user