koishi-plugin-starfx-bot 0.24.0 → 0.24.2
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.d.ts +0 -1
- package/lib/index.js +9 -10
- package/lib/plugins/drawHead.d.ts +2 -2
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -63,7 +63,7 @@ var package_default = {
|
|
|
63
63
|
contributors: [
|
|
64
64
|
"StarFreedomX <starfreedomx@outlook.com>"
|
|
65
65
|
],
|
|
66
|
-
version: "0.
|
|
66
|
+
version: "0.24.2",
|
|
67
67
|
main: "lib/index.js",
|
|
68
68
|
typings: "lib/index.d.ts",
|
|
69
69
|
files: [
|
|
@@ -1292,8 +1292,7 @@ var Config = import_koishi5.Schema.intersect([
|
|
|
1292
1292
|
import_koishi5.Schema.union([
|
|
1293
1293
|
import_koishi5.Schema.object({
|
|
1294
1294
|
originImg: import_koishi5.Schema.const(true).required(),
|
|
1295
|
-
originImgRSSUrl: import_koishi5.Schema.string().required().description("推特列表rss地址")
|
|
1296
|
-
proxyUrl: import_koishi5.Schema.string().default("http://127.0.0.1:7890").description("代理地址")
|
|
1295
|
+
originImgRSSUrl: import_koishi5.Schema.string().required().description("推特列表rss地址")
|
|
1297
1296
|
}),
|
|
1298
1297
|
import_koishi5.Schema.object({})
|
|
1299
1298
|
]),
|
|
@@ -1310,7 +1309,7 @@ function apply(ctx, cfg) {
|
|
|
1310
1309
|
const controlJson = parseJsonControl(cfg.featureControl);
|
|
1311
1310
|
if (cfg.openLock) {
|
|
1312
1311
|
ctx.command("封印 [param]").action(async ({ session }, param) => {
|
|
1313
|
-
if (detectControl(controlJson, session.guildId, "lock"))
|
|
1312
|
+
if (ctx.QhzySharp && detectControl(controlJson, session.guildId, "lock"))
|
|
1314
1313
|
await session.send(
|
|
1315
1314
|
await drawLock(ctx, await getImageSrc(session, param))
|
|
1316
1315
|
);
|
|
@@ -1318,7 +1317,7 @@ function apply(ctx, cfg) {
|
|
|
1318
1317
|
}
|
|
1319
1318
|
if (cfg.openSold) {
|
|
1320
1319
|
ctx.command("卖掉了 [param]").action(async ({ session }, param) => {
|
|
1321
|
-
if (detectControl(controlJson, session.guildId, "sold"))
|
|
1320
|
+
if (ctx.QhzySharp && detectControl(controlJson, session.guildId, "sold"))
|
|
1322
1321
|
await session.send(
|
|
1323
1322
|
await drawSold(ctx, await getImageSrc(session, param))
|
|
1324
1323
|
);
|
|
@@ -1377,7 +1376,7 @@ function apply(ctx, cfg) {
|
|
|
1377
1376
|
}
|
|
1378
1377
|
if (cfg.bangdreamBorder) {
|
|
1379
1378
|
ctx.command("bdbd [param]").option("starNum", "-n <starNum: number>").option("color", "-c <color: string>").option("train", "-t <train: string>").option("band", "-b <band: string>").action(async ({ session, options }, param) => {
|
|
1380
|
-
if (detectControl(controlJson, session.guildId, "bdbd")) {
|
|
1379
|
+
if (ctx.QhzySharp && detectControl(controlJson, session.guildId, "bdbd")) {
|
|
1381
1380
|
const drawConfig = await handleBanGDreamConfig(options);
|
|
1382
1381
|
const imgSrc = await getImageSrc(session, param);
|
|
1383
1382
|
if (!imgSrc?.length) return "输入无效";
|
|
@@ -1525,11 +1524,11 @@ function apply(ctx, cfg) {
|
|
|
1525
1524
|
ctx.command("my-uid").action(({ session }) => session.uid);
|
|
1526
1525
|
ctx.command("my-cid").action(({ session }) => session.cid);
|
|
1527
1526
|
}
|
|
1528
|
-
if (cfg.searchExchangeRate
|
|
1527
|
+
if (cfg.searchExchangeRate) {
|
|
1529
1528
|
ctx.command("查汇率 <exchangeParam:text>").usage("查询当前汇率").example("查汇率 JPY : 查询日元兑换人民币的汇率(3位字母)").example("查汇率 JPYCNY : 查询日元兑换人民币的汇率(6位字母)").example("查汇率 -r avdzk2 : 查询日元兑换人民币的汇率(msn代码avdzk2)").example(
|
|
1530
1529
|
"查汇率 -r auvwoc : 查询黄金的价格(msn代码auvwoc, 很怪吧我也不知道为什么是这个)"
|
|
1531
1530
|
).option("raw", "-r <raw:string>").action(async ({ session, options }, exchangeParam) => {
|
|
1532
|
-
if (detectControl(controlJson, session.guildId, "exchangeRate")) {
|
|
1531
|
+
if (ctx.skia && detectControl(controlJson, session.guildId, "exchangeRate")) {
|
|
1533
1532
|
return await getExchangeRate(
|
|
1534
1533
|
ctx,
|
|
1535
1534
|
cfg,
|
|
@@ -1540,9 +1539,9 @@ function apply(ctx, cfg) {
|
|
|
1540
1539
|
}
|
|
1541
1540
|
});
|
|
1542
1541
|
}
|
|
1543
|
-
if (cfg.intervalGetExchangeRate
|
|
1542
|
+
if (cfg.intervalGetExchangeRate) {
|
|
1544
1543
|
ctx.command("开启汇率推送 [exchangeParam:string]").action(async ({ session }, exchangeParam) => {
|
|
1545
|
-
if (detectControl(controlJson, session.guildId, "exchangeRate")) {
|
|
1544
|
+
if (ctx.skia && detectControl(controlJson, session.guildId, "exchangeRate")) {
|
|
1546
1545
|
const exchangeRatePath = import_node_path4.default.join(assetsDir, "exchangeRate.json");
|
|
1547
1546
|
return await intervalGetExchangeRate(
|
|
1548
1547
|
ctx,
|
|
@@ -17,14 +17,14 @@ export declare function handleBanGDreamConfig(options: any): Promise<{
|
|
|
17
17
|
* @param baseImage 被封印的图片url
|
|
18
18
|
* @return 画完的图片 h对象
|
|
19
19
|
*/
|
|
20
|
-
export declare function drawLock(ctx: Context, baseImage: string): Promise<
|
|
20
|
+
export declare function drawLock(ctx: Context, baseImage: string): Promise<"发生错误" | "输入无效" | h>;
|
|
21
21
|
/**
|
|
22
22
|
* "卖掉了"绘图函数
|
|
23
23
|
* @param ctx
|
|
24
24
|
* @param baseImage
|
|
25
25
|
* @return 画完的图片 h对象
|
|
26
26
|
*/
|
|
27
|
-
export declare function drawSold(ctx: Context, baseImage: string): Promise<
|
|
27
|
+
export declare function drawSold(ctx: Context, baseImage: string): Promise<"发生错误" | "输入无效" | h>;
|
|
28
28
|
/**
|
|
29
29
|
* BanG Dream!边框绘制功能
|
|
30
30
|
* @param ctx Koishi上下文
|
package/package.json
CHANGED