@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.
- package/lib/index.js +1 -1
- 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 && (
|
|
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) {
|