@hieuzest/koishi-plugin-mahjongpub 0.1.18 → 0.1.19

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 +29 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -417,6 +417,35 @@ class MahjongPub {
417
417
  }, true));
418
418
  return msg.join('\n');
419
419
  });
420
+ ctx.command('mahjongpub.admin.record.update <round:natural> <cls:natural> <...points:integer>', { authority: 4 })
421
+ .option('rowi', '-i <rowi:integer>', { fallback: 9 })
422
+ .option('ver', '-v <ver:integer>', { fallback: 0 })
423
+ .action(async ({ session, options }, round, cls, ...points) => {
424
+ const msg = [];
425
+ msg.push('- Mahjongpub');
426
+ msg.push(await session.execute({
427
+ name: 'mahjongpub.contest.record.update',
428
+ args: [round, cls, ...points],
429
+ options,
430
+ }, true));
431
+ msg.push(await session.execute({
432
+ name: 'mahjongpub.contest.record.update',
433
+ args: [round, cls, ...points],
434
+ options,
435
+ }, true));
436
+ msg.push('- Database');
437
+ msg.push(await session.execute({
438
+ name: 'mahjongpub.database.record.get',
439
+ args: [round, cls, ...points],
440
+ options,
441
+ }, true));
442
+ msg.push(await session.execute({
443
+ name: 'mahjongpub.database.record.get',
444
+ args: [round, cls, ...points],
445
+ options,
446
+ }, true));
447
+ return msg.join('\n');
448
+ });
420
449
  }
421
450
  }
422
451
  async getTeam(pw) {
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.1.18",
4
+ "version": "0.1.19",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [