koishi-plugin-echo-cave 1.10.1 → 1.10.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.
Files changed (2) hide show
  1. package/lib/index.cjs +8 -9
  2. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -354,8 +354,7 @@ function apply(ctx, cfg) {
354
354
  },
355
355
  {
356
356
  primary: "id",
357
- autoInc: true,
358
- unique: ["content"]
357
+ autoInc: true
359
358
  }
360
359
  );
361
360
  ctx.command("cave [id:number]").action(
@@ -372,7 +371,7 @@ function apply(ctx, cfg) {
372
371
  }
373
372
  async function getCaveListByUser(ctx, session) {
374
373
  if (!session.guildId) {
375
- return session.text("general.privateChatReminder");
374
+ return session.text("echo-cave.general.privateChatReminder");
376
375
  }
377
376
  const { userId, channelId } = session;
378
377
  const caves = await ctx.database.get("echo_cave", {
@@ -390,7 +389,7 @@ async function getCaveListByUser(ctx, session) {
390
389
  }
391
390
  async function getCaveListByOriginUser(ctx, session) {
392
391
  if (!session.guildId) {
393
- return session.text("general.privateChatReminder");
392
+ return session.text("echo-cave.general.privateChatReminder");
394
393
  }
395
394
  const { userId, channelId } = session;
396
395
  const caves = await ctx.database.get("echo_cave", {
@@ -408,7 +407,7 @@ async function getCaveListByOriginUser(ctx, session) {
408
407
  }
409
408
  async function getCave(ctx, session, id) {
410
409
  if (!session.guildId) {
411
- return session.text("general.privateChatReminder");
410
+ return session.text("echo-cave.general.privateChatReminder");
412
411
  }
413
412
  let caveMsg;
414
413
  const { channelId } = session;
@@ -426,7 +425,7 @@ async function getCave(ctx, session, id) {
426
425
  channelId
427
426
  });
428
427
  if (caves.length === 0) {
429
- return session.text("general.noMsgWithId");
428
+ return session.text("echo-cave.general.noMsgWithId");
430
429
  }
431
430
  caveMsg = caves[0];
432
431
  }
@@ -434,14 +433,14 @@ async function getCave(ctx, session, id) {
434
433
  }
435
434
  async function deleteCave(ctx, session, cfg, id) {
436
435
  if (!session.guildId) {
437
- return session.text("general.privateChatReminder");
436
+ return session.text("echo-cave.general.privateChatReminder");
438
437
  }
439
438
  if (!id) {
440
439
  return session.text(".noIdProvided");
441
440
  }
442
441
  const caves = await ctx.database.get("echo_cave", id);
443
442
  if (caves.length === 0) {
444
- return session.text("general.noMsgWithId");
443
+ return session.text("echo-cave.general.noMsgWithId");
445
444
  }
446
445
  const caveMsg = caves[0];
447
446
  const currentUserId = session.userId;
@@ -473,7 +472,7 @@ async function deleteCave(ctx, session, cfg, id) {
473
472
  }
474
473
  async function addCave(ctx, session) {
475
474
  if (!session.guildId) {
476
- return session.text("general.privateChatReminder");
475
+ return session.text("echo-cave.general.privateChatReminder");
477
476
  }
478
477
  if (!session.quote) {
479
478
  return session.text(".noMsgQuoted");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-echo-cave",
3
3
  "description": "Group echo cave",
4
- "version": "1.10.1",
4
+ "version": "1.10.3",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",