koishi-plugin-ggcevo-game 0.4.2 → 0.4.4
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 +9 -9
- package/package.json +4 -4
- package/readme.md +1 -1
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var name = "ggcevo-game";
|
|
|
32
32
|
var Config = import_koishi.Schema.object({
|
|
33
33
|
proxyAgent: import_koishi.Schema.string().description("代理服务器地址"),
|
|
34
34
|
ggcqun: import_koishi.Schema.string().description("开启咕咕虫排行榜的群组").required(),
|
|
35
|
-
signrequire: import_koishi.Schema.boolean().description("
|
|
35
|
+
signrequire: import_koishi.Schema.boolean().description("是否开启签到要求进行一场游戏").default(true),
|
|
36
36
|
autorank: import_koishi.Schema.boolean().description("是否开启每小时自动同步rank数据").default(true),
|
|
37
37
|
ignoreGlobalLimit: import_koishi.Schema.boolean().description("是否开启无限制兑换").default(false)
|
|
38
38
|
});
|
|
@@ -151,7 +151,7 @@ function apply(ctx, config) {
|
|
|
151
151
|
lastSign: "timestamp"
|
|
152
152
|
}, {
|
|
153
153
|
// 额外配置
|
|
154
|
-
primary: "
|
|
154
|
+
primary: "userId"
|
|
155
155
|
});
|
|
156
156
|
ctx.model.extend("ggcevo_blacklist", {
|
|
157
157
|
// 各字段定义
|
|
@@ -578,7 +578,7 @@ ${itemDetails.join("\n")}`;
|
|
|
578
578
|
}]);
|
|
579
579
|
return `[管理专属] 成功领取本月津贴!获得 50 枚咕咕币`;
|
|
580
580
|
});
|
|
581
|
-
ctx.command("ggcevo/领取福利").
|
|
581
|
+
ctx.command("ggcevo/领取福利").action(async (argv) => {
|
|
582
582
|
const session = argv.session;
|
|
583
583
|
await session.send("请在30秒内输入活动名称:");
|
|
584
584
|
const name2 = await session.prompt(3e4);
|
|
@@ -601,7 +601,7 @@ ${itemDetails.join("\n")}`;
|
|
|
601
601
|
// 新增状态条件
|
|
602
602
|
});
|
|
603
603
|
if (!activity) {
|
|
604
|
-
return "
|
|
604
|
+
return "当前咕咕币活动未在进行中,请输入 咕咕币活动 查询活动名称。";
|
|
605
605
|
}
|
|
606
606
|
const id = activity.id;
|
|
607
607
|
const quantity = activity.quantity;
|
|
@@ -620,7 +620,7 @@ ${itemDetails.join("\n")}`;
|
|
|
620
620
|
second: "2-digit",
|
|
621
621
|
hour12: false
|
|
622
622
|
});
|
|
623
|
-
return
|
|
623
|
+
return `您已领取过该咕咕币活动福利(领取时间:${chinaTime})`;
|
|
624
624
|
}
|
|
625
625
|
await ctx.database.create("ggcevo_welfare", {
|
|
626
626
|
handle,
|
|
@@ -632,7 +632,7 @@ ${itemDetails.join("\n")}`;
|
|
|
632
632
|
itemId: 1,
|
|
633
633
|
quantity: (backpack.quantity || 0) + quantity
|
|
634
634
|
}]);
|
|
635
|
-
return `[活动福利] 成功领取 ${name2}
|
|
635
|
+
return `[活动福利] 成功领取 ${name2} 咕咕币活动奖励,获得 ${quantity} 枚咕咕币`;
|
|
636
636
|
});
|
|
637
637
|
ctx.command("ggcevo/创建活动 <name> <description> <quantity:number>", "创建新活动", { authority: 3 }).option("start", "-s <startTime:date>", { fallback: Date.now() }).option("duration", "-d <days:number>", { fallback: 7 }).action(async ({ session, options }, name2, description, quantity) => {
|
|
638
638
|
if (!name2 || !name2.trim()) {
|
|
@@ -660,7 +660,7 @@ ${itemDetails.join("\n")}`;
|
|
|
660
660
|
ID:${activity.id}
|
|
661
661
|
状态:${status}`;
|
|
662
662
|
});
|
|
663
|
-
ctx.command("ggcevo/咕咕币活动", "
|
|
663
|
+
ctx.command("ggcevo/咕咕币活动", "查看进行中的咕咕币活动").action(async () => {
|
|
664
664
|
const activities = await ctx.database.get("ggcevo_activity", {
|
|
665
665
|
status: "进行中"
|
|
666
666
|
// 完全依赖数据库状态
|
|
@@ -683,7 +683,7 @@ ID:${activity.id}
|
|
|
683
683
|
`奖励:${activity.quantity} 枚咕咕币`,
|
|
684
684
|
"━━━━━━━━━━━━━━"
|
|
685
685
|
].join("\n"));
|
|
686
|
-
return output.length ? output.join("\n\n") : "
|
|
686
|
+
return output.length ? output.join("\n\n") : "当前没有进行中的咕咕币活动";
|
|
687
687
|
});
|
|
688
688
|
ctx.setInterval(async () => {
|
|
689
689
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -1000,7 +1000,7 @@ ID:${activity.id}
|
|
|
1000
1000
|
"萌萌熊": { quality: "t2", type: "宠物", cost: 4, quantity: 3 },
|
|
1001
1001
|
"荆棘蜥蜴": { quality: "t2", type: "宠物", cost: 4, quantity: 3 },
|
|
1002
1002
|
"萌宠小狗": { quality: "t1", type: "宠物", cost: 5, quantity: 2 },
|
|
1003
|
-
"
|
|
1003
|
+
"熔岩虫": { quality: "t1", type: "宠物", cost: 5, quantity: 2 },
|
|
1004
1004
|
"尸甲虫": { quality: "t1", type: "宠物", cost: 5, quantity: 2 },
|
|
1005
1005
|
"绿毛虫": { quality: "t0", type: "宠物", cost: 6, quantity: 1 },
|
|
1006
1006
|
"妙蛙种子": { quality: "t0", type: "宠物", cost: 6, quantity: 1 },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-ggcevo-game",
|
|
3
|
-
"description": "星际争霸2游戏大厅咕咕虫-
|
|
4
|
-
"version": "0.4.
|
|
3
|
+
"description": "星际争霸2游戏大厅咕咕虫-Evo地图专属插件",
|
|
4
|
+
"version": "0.4.4",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"plugin"
|
|
16
16
|
],
|
|
17
17
|
"peerDependencies": {
|
|
18
|
+
"koishi": "^4.18.7",
|
|
18
19
|
"@koishijs/plugin-proxy-agent": "^0.3.3",
|
|
19
|
-
"koishi": "^4.18.3",
|
|
20
20
|
"koishi-plugin-sc2arcade-search": "^0.3.4"
|
|
21
21
|
},
|
|
22
22
|
"koishi": {
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|
package/readme.md
CHANGED