@hieuzest/koishi-plugin-mahjongpub 0.3.8 → 0.3.9

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.js +1 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1478,7 +1478,7 @@ var MahjongPub2 = class extends import_koishi4.Service {
1478
1478
  });
1479
1479
  ctx.command("mahjongpub.team.swap <...indices:natural>", { authority: 1 }).alias("!交换", "!交换").option("channel", "-c <channel:channel>").option("team", "-t <team:string>").option("start", "-s <start:number>").option("end", "-e <end:number>").option("slim", "--slim").userFields(["mahjongpub/bind-team", "mahjongpub/bind-teams", "authority"]).channelFields(["mahjongpub/bind-team", "mahjongpub/bind-contest", "mahjongpub/bind-contestpw", "mahjongpub/bind-contesteditrow"]).action(async ({ session, options }, ...indices) => {
1480
1480
  let pw = options.channel ? (await session.getChannel(parsePlatform(options.channel)[1], ["mahjongpub/bind-team"]))["mahjongpub/bind-team"] : session.isDirect ? session.user["mahjongpub/bind-team"] : session.channel["mahjongpub/bind-team"] ?? session.user["mahjongpub/bind-team"];
1481
- if (session.user.authority < 3 && (!pw || options.team || options.start || options.end)) {
1481
+ if (session.user.authority < 3 && (options.team || options.start || options.end)) {
1482
1482
  return session.text(".unauthorized");
1483
1483
  }
1484
1484
  if (session.user.authority < 3) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hieuzest/koishi-plugin-mahjongpub",
3
3
  "description": "Mahjong.pub API",
4
- "version": "0.3.8",
4
+ "version": "0.3.9",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [