koishi-plugin-ll-brick 1.0.9 → 1.0.10

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 CHANGED
@@ -29,6 +29,10 @@ export interface Config {
29
29
  adminUsers: string[];
30
30
  /** 「拍人」消息顶部图片 URL(需公网可访问;留空则不显示图片) */
31
31
  slapImage: string;
32
+ /** 「烧砖」消息顶部图片 URL */
33
+ fireImage: string;
34
+ /** 「签到」消息顶部图片 URL */
35
+ signImage: string;
32
36
  checking: boolean;
33
37
  minGain?: number;
34
38
  maxGain?: number;
package/lib/index.js CHANGED
@@ -40,6 +40,12 @@ exports.Config = koishi_1.Schema.intersect([
40
40
  slapImage: koishi_1.Schema.string()
41
41
  .default('https://img3.tofaka.com/autoupload/ontjZmlK09ZHnuFOv9znC7KXl_QqVl-bpSwqP4fJO68/20260624/lOIl/240X240/images.jpg')
42
42
  .description('「拍人」消息顶部图片 URL(需公网可访问;留空则不显示图片)'),
43
+ fireImage: koishi_1.Schema.string()
44
+ .default('https://img3.tofaka.com/autoupload/ontjZmlK09ZHnuFOv9znC7KXl_QqVl-bpSwqP4fJO68/20260624/xsnm/447X447/images_%282%29.jpg')
45
+ .description('「烧砖」消息顶部图片 URL(需公网可访问;留空则不显示图片)'),
46
+ signImage: koishi_1.Schema.string()
47
+ .default('https://img3.tofaka.com/autoupload/ontjZmlK09ZHnuFOv9znC7KXl_QqVl-bpSwqP4fJO68/20260624/yNf2/447X447/images_%281%29.jpg')
48
+ .description('「签到」消息顶部图片 URL(需公网可访问;留空则不显示图片)'),
43
49
  }),
44
50
  koishi_1.Schema.object({
45
51
  checking: koishi_1.Schema.boolean()
@@ -163,14 +169,12 @@ async function apply(ctx, config) {
163
169
  }
164
170
  users[user].burning = true;
165
171
  const startCard = mdCard([
166
- '# 🔥 砖厂开始烧砖啦!',
167
- '---',
168
- '> 🏭 **工作状态**:现在开始烧砖啦!',
169
- `> 💬 **烧砖规则**:群友每发送 **${config.cost}** 条消息,就能成功烧好一块新砖 🧱`,
170
- '> 📢 大家快来水群,给砖窑添把火吧!',
172
+ '🏭 **工作状态**:现在开始烧砖啦!',
173
+ `💬 **烧砖规则**:群友每发送 **${config.cost}** 条消息,就能成功烧好一块新砖 🧱`,
174
+ '📢 大家快来水群,给砖窑添把火吧!',
171
175
  ]);
172
176
  if (session.platform === 'qq') {
173
- await sendQQMarkdown(session, startCard);
177
+ await sendQQMarkdown(session, startCard, config.fireImage, 447);
174
178
  }
175
179
  else {
176
180
  await session.send(startCard);
@@ -188,13 +192,11 @@ async function apply(ctx, config) {
188
192
  }], ["userId", "guildId"]);
189
193
  users[user].burning = false;
190
194
  const fireDone = mdCard([
191
- '# 🎉 砖厂出炉啦!',
192
- '---',
193
- `> 🔨 ${atUser(session, session.userId)} 砖已经烧好啦!`,
194
- '> 📢 快去用 `砖头 拍人` 狠狠地拍一下吧!',
195
+ `🔨 ${atUser(session, session.userId)} 砖已经烧好啦!`,
196
+ '📢 快去用 `砖头 拍人` 狠狠地拍一下吧!',
195
197
  ]);
196
198
  if (session.platform === 'qq') {
197
- await sendQQMarkdown(session, fireDone);
199
+ await sendQQMarkdown(session, fireDone, config.fireImage, 447);
198
200
  }
199
201
  else {
200
202
  await session.send(fireDone);
@@ -247,7 +249,6 @@ async function apply(ctx, config) {
247
249
  const muteErr = await tryMute(session.userId);
248
250
  const msg = mdCard([
249
251
  `${atUser(session, targetUserId)} 夺过你的砖头,把你拍晕了 **${muteTime}** 秒 🏏`,
250
- '⚠️ 危险警告:有人动用了板砖!',
251
252
  muteErr ? '(因为我不是群管理员,所以并没什么卵用)' : '',
252
253
  ]);
253
254
  if (isQQ) {
@@ -260,7 +261,6 @@ async function apply(ctx, config) {
260
261
  const muteErr = await tryMute(targetUserId);
261
262
  const msg = mdCard([
262
263
  `${atUser(session, targetUserId)} 你被 ${atUser(session, session.userId)} 一砖头拍晕了 **${muteTime}** 秒 🏏`,
263
- '⚠️ 危险警告:有人动用了板砖!',
264
264
  muteErr ? '(因为我不是群管理员,所以并没什么卵用)' : '',
265
265
  ]);
266
266
  if (isQQ) {
@@ -387,13 +387,11 @@ async function apply(ctx, config) {
387
387
  checkingDay: today
388
388
  });
389
389
  const card = mdCard([
390
- '# 🎡 砖厂打卡成功!',
391
- '---',
392
- `> 😋 辛苦啦!你刚刚搬运获得了 **${brick}** 块砖头 🧱`,
393
- `> 📦 **当前库存**:你现在共有 \`${brick}/${config.maxBrick}\` 块砖头。`,
390
+ `😋 辛苦啦!你刚刚搬运获得了 **${brick}** 块砖头 🧱`,
391
+ `📦 **当前库存**:你现在共有 \`${brick}/${config.maxBrick}\` 块砖头。`,
394
392
  ]);
395
393
  if (session.platform === 'qq') {
396
- await sendQQMarkdown(session, card);
394
+ await sendQQMarkdown(session, card, config.signImage, 447);
397
395
  return;
398
396
  }
399
397
  return card;
@@ -418,13 +416,11 @@ async function apply(ctx, config) {
418
416
  }], ["userId", "guildId"]);
419
417
  const total = userData[0].brick + brick;
420
418
  const card = mdCard([
421
- '# 🎡 砖厂打卡成功!',
422
- '---',
423
- `> 😋 辛苦啦!你刚刚搬运获得了 **${brick}** 块砖头 🧱`,
424
- `> 📦 **当前库存**:你现在共有 \`${total}/${config.maxBrick}\` 块砖头。`,
419
+ `😋 辛苦啦!你刚刚搬运获得了 **${brick}** 块砖头 🧱`,
420
+ `📦 **当前库存**:你现在共有 \`${total}/${config.maxBrick}\` 块砖头。`,
425
421
  ]);
426
422
  if (session.platform === 'qq') {
427
- await sendQQMarkdown(session, card);
423
+ await sendQQMarkdown(session, card, config.signImage, 447);
428
424
  return;
429
425
  }
430
426
  return card;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ll-brick",
3
3
  "description": "砖头拍人插件(克隆自 koishi-plugin-brick),非管理员时会提示",
4
- "version": "1.0.9",
4
+ "version": "1.0.10",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [