@zhin.js/plugin-game-hub 1.0.7 → 1.0.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/commands/games/{[action:string=].js → [[action]].js} +1 -0
- package/commands/games/{[action:string=].ts → [[action]].ts} +1 -0
- package/commands//346/216/222/350/241/214/{[query:string=].js → [[query]].js} +1 -0
- package/commands//346/216/222/350/241/214/{[query:string=].ts → [[query]].ts} +1 -0
- package/package.json +4 -4
|
@@ -3,6 +3,7 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import { formatRuntimeGamesHelp, getRuntimeGame } from '@zhin.js/game-kit';
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: 'Game hub — list loaded games',
|
|
6
|
+
params: { action: { type: 'string', default: '' } },
|
|
6
7
|
async execute({ params }) {
|
|
7
8
|
const action = String(params.action ?? '').trim();
|
|
8
9
|
if (action) {
|
|
@@ -3,6 +3,7 @@ import { formatRuntimeGamesHelp, getRuntimeGame } from '@zhin.js/game-kit';
|
|
|
3
3
|
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: 'Game hub — list loaded games',
|
|
6
|
+
params: { action: { type: 'string', default: '' } },
|
|
6
7
|
async execute({ params }) {
|
|
7
8
|
const action = String(params.action ?? '').trim();
|
|
8
9
|
if (action) {
|
|
@@ -12,6 +12,7 @@ function formatLeaderboard(gameId, entries) {
|
|
|
12
12
|
}
|
|
13
13
|
export default defineCommand({
|
|
14
14
|
description: '查看本群某游戏排行榜',
|
|
15
|
+
params: { query: { type: 'string', default: '' } },
|
|
15
16
|
async execute({ input, params }) {
|
|
16
17
|
const query = String(params.query ?? '').trim();
|
|
17
18
|
const games = getRuntimeGames();
|
|
@@ -22,6 +22,7 @@ function formatLeaderboard(gameId: string, entries: LeaderboardEntry[]): string
|
|
|
22
22
|
|
|
23
23
|
export default defineCommand({
|
|
24
24
|
description: '查看本群某游戏排行榜',
|
|
25
|
+
params: { query: { type: 'string', default: '' } },
|
|
25
26
|
async execute({ input, params }) {
|
|
26
27
|
const query = String(params.query ?? '').trim();
|
|
27
28
|
const games = getRuntimeGames();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-game-hub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Zhin.js 游戏大厅 — 列出已加载的游戏插件 (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
],
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@zhin.js/command": "1.0.
|
|
27
|
-
"@zhin.js/game-kit": "3.0.
|
|
28
|
-
"@zhin.js/plugin-runtime": "1.1.
|
|
26
|
+
"@zhin.js/command": "1.0.7",
|
|
27
|
+
"@zhin.js/game-kit": "3.0.2",
|
|
28
|
+
"@zhin.js/plugin-runtime": "1.1.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^6.0.3",
|