@zhin.js/plugin-tic-tac-toe 1.0.8 → 1.0.10
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.
|
@@ -5,6 +5,7 @@ import { TTT_HELP, runTttCommand } from "../../lib/ttt-command.js";
|
|
|
5
5
|
import { resolveGameServices } from "../../lib/runtime-store.js";
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'Tic Tac Toe',
|
|
8
|
+
params: { action: { type: 'string', default: '' } },
|
|
8
9
|
async execute({ params, input, use, owner }) {
|
|
9
10
|
const action = normalizeTttAction(String(params.action ?? ''));
|
|
10
11
|
if (!action || action === 'help')
|
|
@@ -5,6 +5,7 @@ import { resolveGameServices } from '../../src/runtime-store.js';
|
|
|
5
5
|
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'Tic Tac Toe',
|
|
8
|
+
params: { action: { type: 'string', default: '' } },
|
|
8
9
|
async execute({ params, input, use, owner }) {
|
|
9
10
|
const action = normalizeTttAction(String(params.action ?? ''));
|
|
10
11
|
if (!action || action === 'help') return TTT_HELP;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-tic-tac-toe",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Zhin.js 跨平台井字棋 (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zhin.js/command": "1.0.
|
|
28
|
-
"@zhin.js/core": "1.5.
|
|
29
|
-
"@zhin.js/game-kit": "3.0.
|
|
30
|
-
"@zhin.js/middleware": "1.0.
|
|
31
|
-
"@zhin.js/plugin-runtime": "1.1.
|
|
27
|
+
"@zhin.js/command": "1.0.7",
|
|
28
|
+
"@zhin.js/core": "1.5.2",
|
|
29
|
+
"@zhin.js/game-kit": "3.0.2",
|
|
30
|
+
"@zhin.js/middleware": "1.0.6",
|
|
31
|
+
"@zhin.js/plugin-runtime": "1.1.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "^6.0.3",
|
package/plugin.js
CHANGED
|
@@ -62,8 +62,7 @@ export default defineGamePlugin({
|
|
|
62
62
|
await Promise.all(spectators.map((userId) => outbound.send({
|
|
63
63
|
adapter: session.adapter,
|
|
64
64
|
endpointId: session.endpoint,
|
|
65
|
-
|
|
66
|
-
channelId: userId,
|
|
65
|
+
conversation: { kind: 'private', id: userId },
|
|
67
66
|
content,
|
|
68
67
|
})));
|
|
69
68
|
};
|