@metatell/bot-cli 0.0.6 → 0.0.7

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.
@@ -1,373 +1,230 @@
1
- "use strict";
2
1
  /**
3
2
  * Command parser and executor for CLI commands
4
3
  */
5
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7
- return new (P || (P = Promise))(function (resolve, reject) {
8
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
10
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11
- step((generator = generator.apply(thisArg, _arguments || [])).next());
12
- });
13
- };
14
- var __generator = (this && this.__generator) || function (thisArg, body) {
15
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
16
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
17
- function verb(n) { return function (v) { return step([n, v]); }; }
18
- function step(op) {
19
- if (f) throw new TypeError("Generator is already executing.");
20
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
21
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
22
- if (y = 0, t) op = [op[0] & 2, t.value];
23
- switch (op[0]) {
24
- case 0: case 1: t = op; break;
25
- case 4: _.label++; return { value: op[1], done: false };
26
- case 5: _.label++; y = op[1]; op = [0]; continue;
27
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
28
- default:
29
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
30
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
31
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
32
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
33
- if (t[2]) _.ops.pop();
34
- _.trys.pop(); continue;
35
- }
36
- op = body.call(thisArg, _);
37
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
38
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
39
- }
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.CommandParser = void 0;
43
- var CommandParser = /** @class */ (function () {
44
- function CommandParser() {
4
+ export class CommandParser {
5
+ async execute(input, client) {
6
+ const parts = input.split(/\s+/);
7
+ const command = parts[0].toLowerCase();
8
+ const args = parts.slice(1);
9
+ switch (command) {
10
+ case '/help':
11
+ case '/?':
12
+ return this.showHelp();
13
+ case '/say':
14
+ return this.say(args, client);
15
+ case '/move':
16
+ return this.move(args, client);
17
+ case '/look':
18
+ return this.look(args, client);
19
+ case '/nearby':
20
+ return this.nearby(args, client);
21
+ case '/users':
22
+ return this.listUsers(client);
23
+ case '/status':
24
+ return this.showStatus(client);
25
+ case '/info':
26
+ return this.showInfo(client);
27
+ case '/anime':
28
+ case '/animation':
29
+ return this.playAnimation(args, client);
30
+ case '/stop':
31
+ return this.stopAnimation(client);
32
+ case '/avatar':
33
+ return this.changeAvatar(args, client);
34
+ case '/assets':
35
+ return this.listAssets(client);
36
+ case '/animations':
37
+ return this.listAnimations(client);
38
+ default:
39
+ return {
40
+ success: false,
41
+ message: `Unknown command: ${command}. Type /help for commands.`,
42
+ };
43
+ }
45
44
  }
46
- CommandParser.prototype.execute = function (input, client) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var parts, command, args;
49
- return __generator(this, function (_a) {
50
- parts = input.split(/\s+/);
51
- command = parts[0].toLowerCase();
52
- args = parts.slice(1);
53
- switch (command) {
54
- case '/help':
55
- case '/?':
56
- return [2 /*return*/, this.showHelp()];
57
- case '/say':
58
- return [2 /*return*/, this.say(args, client)];
59
- case '/move':
60
- return [2 /*return*/, this.move(args, client)];
61
- case '/look':
62
- return [2 /*return*/, this.look(args, client)];
63
- case '/nearby':
64
- return [2 /*return*/, this.nearby(args, client)];
65
- case '/users':
66
- return [2 /*return*/, this.listUsers(client)];
67
- case '/status':
68
- return [2 /*return*/, this.showStatus(client)];
69
- case '/info':
70
- return [2 /*return*/, this.showInfo(client)];
71
- case '/anime':
72
- case '/animation':
73
- return [2 /*return*/, this.playAnimation(args, client)];
74
- case '/stop':
75
- return [2 /*return*/, this.stopAnimation(client)];
76
- case '/avatar':
77
- return [2 /*return*/, this.changeAvatar(args, client)];
78
- case '/assets':
79
- return [2 /*return*/, this.listAssets(client)];
80
- case '/animations':
81
- return [2 /*return*/, this.listAnimations(client)];
82
- default:
83
- return [2 /*return*/, {
84
- success: false,
85
- message: "Unknown command: ".concat(command, ". Type /help for commands."),
86
- }];
87
- }
88
- return [2 /*return*/];
89
- });
90
- });
91
- };
92
- CommandParser.prototype.showHelp = function () {
93
- var help = "\nAvailable commands:\n /help, /? - Show this help\n /say <message> - Send a message\n /move <x> <y> <z> - Move avatar to position\n /look <x> <y> <z> - Look at position\n /look @<username> - Look at user\n /nearby [radius] - Show nearby users (default: 10)\n /users - List all users\n /status - Show connection status\n /info - Show bot info\n /avatar <id> - Change avatar\n /assets - List available avatars\n /anime <name> - Play animation\n /animations - List available animations\n /stop - Stop current animation\n quit, exit - Exit the program\n";
45
+ showHelp() {
46
+ const help = `
47
+ Available commands:
48
+ /help, /? - Show this help
49
+ /say <message> - Send a message
50
+ /move <x> <y> <z> - Move avatar to position
51
+ /look <x> <y> <z> - Look at position
52
+ /look @<username> - Look at user
53
+ /nearby [radius] - Show nearby users (default: 10)
54
+ /users - List all users
55
+ /status - Show connection status
56
+ /info - Show bot info
57
+ /avatar <id> - Change avatar
58
+ /assets - List available avatars
59
+ /anime <name> - Play animation
60
+ /animations - List available animations
61
+ /stop - Stop current animation
62
+ quit, exit - Exit the program
63
+ `;
94
64
  console.log(help);
95
65
  return { success: true };
96
- };
97
- CommandParser.prototype.say = function (args, client) {
98
- return __awaiter(this, void 0, void 0, function () {
99
- var message;
100
- return __generator(this, function (_a) {
101
- switch (_a.label) {
102
- case 0:
103
- if (args.length === 0) {
104
- return [2 /*return*/, { success: false, message: 'Usage: /say <message>' }];
105
- }
106
- message = args.join(' ');
107
- return [4 /*yield*/, client.chat.send(message)];
108
- case 1:
109
- _a.sent();
110
- console.log('[Sent]', message);
111
- return [2 /*return*/, { success: true }];
112
- }
113
- });
114
- });
115
- };
116
- CommandParser.prototype.move = function (args, client) {
117
- return __awaiter(this, void 0, void 0, function () {
118
- var x, y, z;
119
- return __generator(this, function (_a) {
120
- switch (_a.label) {
121
- case 0:
122
- if (args.length !== 3) {
123
- return [2 /*return*/, { success: false, message: 'Usage: /move <x> <y> <z>' }];
124
- }
125
- x = parseFloat(args[0]);
126
- y = parseFloat(args[1]);
127
- z = parseFloat(args[2]);
128
- if (Number.isNaN(x) || Number.isNaN(y) || Number.isNaN(z)) {
129
- return [2 /*return*/, { success: false, message: 'Invalid coordinates. Must be numbers.' }];
130
- }
131
- return [4 /*yield*/, client.avatar.moveTo({ x: x, y: y, z: z })];
132
- case 1:
133
- _a.sent();
134
- console.log("[Moved to] x:".concat(x, " y:").concat(y, " z:").concat(z));
135
- return [2 /*return*/, { success: true }];
136
- }
137
- });
138
- });
139
- };
140
- CommandParser.prototype.look = function (args, client) {
141
- return __awaiter(this, void 0, void 0, function () {
142
- var username_1, users, targetUser, x, y, z;
143
- return __generator(this, function (_a) {
144
- switch (_a.label) {
145
- case 0:
146
- if (args.length === 0) {
147
- return [2 /*return*/, { success: false, message: 'Usage: /look <x> <y> <z> or /look @<username>' }];
148
- }
149
- if (!args[0].startsWith('@')) return [3 /*break*/, 2];
150
- username_1 = args[0].substring(1);
151
- return [4 /*yield*/, client.room.getUsers()];
152
- case 1:
153
- users = _a.sent();
154
- targetUser = users.find(function (u) { var _a; return ((_a = u.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === username_1.toLowerCase(); });
155
- if (!targetUser) {
156
- return [2 /*return*/, { success: false, message: "User not found: ".concat(username_1) }];
157
- }
158
- // TODO: ユーザーの位置を取得して見る機能はSDKに未実装
159
- console.log("[Looking at] ".concat(targetUser.name));
160
- return [2 /*return*/, { success: true, message: 'Looking at user (position tracking not yet implemented)' }];
161
- case 2:
162
- // 座標を見る場合
163
- if (args.length !== 3) {
164
- return [2 /*return*/, { success: false, message: 'Usage: /look <x> <y> <z>' }];
165
- }
166
- x = parseFloat(args[0]);
167
- y = parseFloat(args[1]);
168
- z = parseFloat(args[2]);
169
- if (Number.isNaN(x) || Number.isNaN(y) || Number.isNaN(z)) {
170
- return [2 /*return*/, { success: false, message: 'Invalid coordinates. Must be numbers.' }];
171
- }
172
- // 指定座標を見る
173
- return [4 /*yield*/, client.avatar.lookAt({ x: x, y: y, z: z })];
174
- case 3:
175
- // 指定座標を見る
176
- _a.sent();
177
- console.log("[Looking at] x:".concat(x, " y:").concat(y, " z:").concat(z));
178
- return [2 /*return*/, { success: true }];
179
- }
180
- });
181
- });
182
- };
183
- CommandParser.prototype.nearby = function (args, client) {
184
- return __awaiter(this, void 0, void 0, function () {
185
- var radius, nearbyUsers;
186
- return __generator(this, function (_a) {
187
- switch (_a.label) {
188
- case 0:
189
- radius = args.length > 0 ? parseFloat(args[0]) : 10;
190
- if (Number.isNaN(radius)) {
191
- return [2 /*return*/, { success: false, message: 'Invalid radius. Must be a number.' }];
192
- }
193
- return [4 /*yield*/, client.room.getNearbyUsers(radius)];
194
- case 1:
195
- nearbyUsers = _a.sent();
196
- console.log("[Nearby users within ".concat(radius, "m]"));
197
- nearbyUsers.forEach(function (u) {
198
- console.log("- ".concat(u.name || 'Anonymous', " (").concat(u.id, ")").concat(u.isBot ? ' [Bot]' : ''));
199
- });
200
- return [2 /*return*/, { success: true }];
201
- }
202
- });
66
+ }
67
+ async say(args, client) {
68
+ if (args.length === 0) {
69
+ return { success: false, message: 'Usage: /say <message>' };
70
+ }
71
+ const message = args.join(' ');
72
+ await client.chat.send(message);
73
+ console.log('[Sent]', message);
74
+ return { success: true };
75
+ }
76
+ async move(args, client) {
77
+ if (args.length !== 3) {
78
+ return { success: false, message: 'Usage: /move <x> <y> <z>' };
79
+ }
80
+ const x = parseFloat(args[0]);
81
+ const y = parseFloat(args[1]);
82
+ const z = parseFloat(args[2]);
83
+ if (Number.isNaN(x) || Number.isNaN(y) || Number.isNaN(z)) {
84
+ return { success: false, message: 'Invalid coordinates. Must be numbers.' };
85
+ }
86
+ await client.avatar.moveTo({ x, y, z });
87
+ console.log(`[Moved to] x:${x} y:${y} z:${z}`);
88
+ return { success: true };
89
+ }
90
+ async look(args, client) {
91
+ if (args.length === 0) {
92
+ return { success: false, message: 'Usage: /look <x> <y> <z> or /look @<username>' };
93
+ }
94
+ // ユーザーを見る場合
95
+ if (args[0].startsWith('@')) {
96
+ const username = args[0].substring(1);
97
+ const users = await client.room.getUsers();
98
+ const targetUser = users.find((u) => u.name?.toLowerCase() === username.toLowerCase());
99
+ if (!targetUser) {
100
+ return { success: false, message: `User not found: ${username}` };
101
+ }
102
+ // TODO: ユーザーの位置を取得して見る機能はSDKに未実装
103
+ console.log(`[Looking at] ${targetUser.name}`);
104
+ return { success: true, message: 'Looking at user (position tracking not yet implemented)' };
105
+ }
106
+ // 座標を見る場合
107
+ if (args.length !== 3) {
108
+ return { success: false, message: 'Usage: /look <x> <y> <z>' };
109
+ }
110
+ const x = parseFloat(args[0]);
111
+ const y = parseFloat(args[1]);
112
+ const z = parseFloat(args[2]);
113
+ if (Number.isNaN(x) || Number.isNaN(y) || Number.isNaN(z)) {
114
+ return { success: false, message: 'Invalid coordinates. Must be numbers.' };
115
+ }
116
+ // 指定座標を見る
117
+ await client.avatar.lookAt({ x, y, z });
118
+ console.log(`[Looking at] x:${x} y:${y} z:${z}`);
119
+ return { success: true };
120
+ }
121
+ async nearby(args, client) {
122
+ const radius = args.length > 0 ? parseFloat(args[0]) : 10;
123
+ if (Number.isNaN(radius)) {
124
+ return { success: false, message: 'Invalid radius. Must be a number.' };
125
+ }
126
+ const nearbyUsers = await client.room.getNearbyUsers(radius);
127
+ console.log(`[Nearby users within ${radius}m]`);
128
+ nearbyUsers.forEach((u) => {
129
+ console.log(`- ${u.name || 'Anonymous'} (${u.id})${u.isBot ? ' [Bot]' : ''}`);
203
130
  });
204
- };
205
- CommandParser.prototype.listUsers = function (client) {
206
- return __awaiter(this, void 0, void 0, function () {
207
- var users;
208
- return __generator(this, function (_a) {
209
- switch (_a.label) {
210
- case 0: return [4 /*yield*/, client.room.getUsers()];
211
- case 1:
212
- users = _a.sent();
213
- console.log("[Users (".concat(users.length, ")]"));
214
- users.forEach(function (u) {
215
- console.log("- ".concat(u.name || 'Anonymous', " (").concat(u.id, ")").concat(u.isBot ? ' [Bot]' : ''));
216
- });
217
- return [2 /*return*/, { success: true }];
218
- }
219
- });
131
+ return { success: true };
132
+ }
133
+ async listUsers(client) {
134
+ const users = await client.room.getUsers();
135
+ console.log(`[Users (${users.length})]`);
136
+ users.forEach((u) => {
137
+ console.log(`- ${u.name || 'Anonymous'} (${u.id})${u.isBot ? ' [Bot]' : ''}`);
220
138
  });
221
- };
222
- CommandParser.prototype.showStatus = function (client) {
223
- var status = client.getStatus();
224
- var sessionId = client.getSessionId();
139
+ return { success: true };
140
+ }
141
+ showStatus(client) {
142
+ const status = client.getStatus();
143
+ const sessionId = client.getSessionId();
225
144
  console.log('[Status]');
226
- console.log("Connected: ".concat(status.connected));
227
- console.log("Connecting: ".concat(status.connecting));
228
- console.log("Session ID: ".concat(sessionId || 'N/A'));
145
+ console.log(`Connected: ${status.connected}`);
146
+ console.log(`Connecting: ${status.connecting}`);
147
+ console.log(`Session ID: ${sessionId || 'N/A'}`);
229
148
  return { success: true };
230
- };
231
- CommandParser.prototype.showInfo = function (client) {
232
- return __awaiter(this, void 0, void 0, function () {
233
- var info;
234
- return __generator(this, function (_a) {
235
- switch (_a.label) {
236
- case 0: return [4 /*yield*/, client.getInfo()];
237
- case 1:
238
- info = _a.sent();
239
- console.log('[Bot Info]');
240
- console.log("Name: ".concat(info.name));
241
- console.log("Version: ".concat(info.version));
242
- console.log("Room ID: ".concat(info.roomId));
243
- return [2 /*return*/, { success: true }];
244
- }
245
- });
246
- });
247
- };
248
- CommandParser.prototype.changeAvatar = function (args, client) {
249
- return __awaiter(this, void 0, void 0, function () {
250
- var avatarId, error_1, errorMessage;
251
- return __generator(this, function (_a) {
252
- switch (_a.label) {
253
- case 0:
254
- if (args.length === 0) {
255
- return [2 /*return*/, { success: false, message: 'Usage: /avatar <id>' }];
256
- }
257
- avatarId = args[0];
258
- _a.label = 1;
259
- case 1:
260
- _a.trys.push([1, 3, , 4]);
261
- return [4 /*yield*/, client.avatar.select(avatarId)];
262
- case 2:
263
- _a.sent();
264
- console.log("[Avatar changed to] ".concat(avatarId));
265
- return [2 /*return*/, { success: true }];
266
- case 3:
267
- error_1 = _a.sent();
268
- errorMessage = error_1 instanceof Error ? error_1.message : 'Unknown error';
269
- console.error('[Error]', errorMessage);
270
- return [2 /*return*/, {
271
- success: false,
272
- message: "Failed to change avatar: ".concat(errorMessage),
273
- }];
274
- case 4: return [2 /*return*/];
275
- }
276
- });
277
- });
278
- };
279
- CommandParser.prototype.listAssets = function (client) {
280
- return __awaiter(this, void 0, void 0, function () {
281
- var assets;
282
- return __generator(this, function (_a) {
283
- switch (_a.label) {
284
- case 0: return [4 /*yield*/, client.avatar.getAvailableAssets()];
285
- case 1:
286
- assets = _a.sent();
287
- console.log("[Available avatars (".concat(assets.length, ")]"));
288
- assets.forEach(function (asset) {
289
- console.log("- ".concat(asset.id, ": ").concat(asset.name));
290
- });
291
- return [2 /*return*/, { success: true }];
292
- }
293
- });
294
- });
295
- };
296
- CommandParser.prototype.playAnimation = function (args, client) {
297
- return __awaiter(this, void 0, void 0, function () {
298
- var animationName, error_2;
299
- return __generator(this, function (_a) {
300
- switch (_a.label) {
301
- case 0:
302
- if (args.length === 0) {
303
- return [2 /*return*/, { success: false, message: 'Usage: /anime <name>' }];
304
- }
305
- animationName = args.join(' ');
306
- _a.label = 1;
307
- case 1:
308
- _a.trys.push([1, 3, , 4]);
309
- return [4 /*yield*/, client.avatar.play({
310
- name: animationName,
311
- id: animationName,
312
- loop: false,
313
- })];
314
- case 2:
315
- _a.sent();
316
- console.log("[Playing animation] ".concat(animationName));
317
- return [2 /*return*/, { success: true }];
318
- case 3:
319
- error_2 = _a.sent();
320
- return [2 /*return*/, {
321
- success: false,
322
- message: "Failed to play animation: ".concat(error_2 instanceof Error ? error_2.message : 'Unknown error'),
323
- }];
324
- case 4: return [2 /*return*/];
325
- }
326
- });
149
+ }
150
+ async showInfo(client) {
151
+ const info = await client.getInfo();
152
+ console.log('[Bot Info]');
153
+ console.log(`Name: ${info.name}`);
154
+ console.log(`Version: ${info.version}`);
155
+ console.log(`Room ID: ${info.roomId}`);
156
+ return { success: true };
157
+ }
158
+ async changeAvatar(args, client) {
159
+ if (args.length === 0) {
160
+ return { success: false, message: 'Usage: /avatar <id>' };
161
+ }
162
+ const avatarId = args[0];
163
+ try {
164
+ await client.avatar.select(avatarId);
165
+ console.log(`[Avatar changed to] ${avatarId}`);
166
+ return { success: true };
167
+ }
168
+ catch (error) {
169
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
170
+ console.error('[Error]', errorMessage);
171
+ return {
172
+ success: false,
173
+ message: `Failed to change avatar: ${errorMessage}`,
174
+ };
175
+ }
176
+ }
177
+ async listAssets(client) {
178
+ const assets = await client.avatar.getAvailableAssets();
179
+ console.log(`[Available avatars (${assets.length})]`);
180
+ assets.forEach((asset) => {
181
+ console.log(`- ${asset.id}: ${asset.name}`);
327
182
  });
328
- };
329
- CommandParser.prototype.stopAnimation = function (client) {
330
- return __awaiter(this, void 0, void 0, function () {
331
- var _a;
332
- return __generator(this, function (_b) {
333
- switch (_b.label) {
334
- case 0:
335
- _b.trys.push([0, 2, , 3]);
336
- return [4 /*yield*/, client.avatar.play({
337
- name: 'idle',
338
- id: 'idle',
339
- loop: true,
340
- })];
341
- case 1:
342
- _b.sent();
343
- console.log('[Stopped animation]');
344
- return [2 /*return*/, { success: true }];
345
- case 2:
346
- _a = _b.sent();
347
- return [2 /*return*/, { success: true, message: 'Animation stopped' }];
348
- case 3: return [2 /*return*/];
349
- }
183
+ return { success: true };
184
+ }
185
+ async playAnimation(args, client) {
186
+ if (args.length === 0) {
187
+ return { success: false, message: 'Usage: /anime <name>' };
188
+ }
189
+ const animationName = args.join(' ');
190
+ try {
191
+ await client.avatar.play({
192
+ name: animationName,
193
+ id: animationName,
194
+ loop: false,
350
195
  });
351
- });
352
- };
353
- CommandParser.prototype.listAnimations = function (client) {
354
- return __awaiter(this, void 0, void 0, function () {
355
- var animations;
356
- return __generator(this, function (_a) {
357
- switch (_a.label) {
358
- case 0: return [4 /*yield*/, client.avatar.getAvailableAnimations()];
359
- case 1:
360
- animations = _a.sent();
361
- console.log("[Available animations (".concat(animations.length, ")]"));
362
- animations.forEach(function (anim) {
363
- var duration = anim.duration ? " (".concat(anim.duration.toFixed(1), "s)") : '';
364
- console.log("- ".concat(anim.id || anim.name, ": ").concat(anim.name).concat(duration));
365
- });
366
- return [2 /*return*/, { success: true }];
367
- }
196
+ console.log(`[Playing animation] ${animationName}`);
197
+ return { success: true };
198
+ }
199
+ catch (error) {
200
+ return {
201
+ success: false,
202
+ message: `Failed to play animation: ${error instanceof Error ? error.message : 'Unknown error'}`,
203
+ };
204
+ }
205
+ }
206
+ async stopAnimation(client) {
207
+ // アイドルアニメーションに戻す
208
+ try {
209
+ await client.avatar.play({
210
+ name: 'idle',
211
+ id: 'idle',
212
+ loop: true,
368
213
  });
214
+ console.log('[Stopped animation]');
215
+ return { success: true };
216
+ }
217
+ catch {
218
+ return { success: true, message: 'Animation stopped' };
219
+ }
220
+ }
221
+ async listAnimations(client) {
222
+ const animations = await client.avatar.getAvailableAnimations();
223
+ console.log(`[Available animations (${animations.length})]`);
224
+ animations.forEach((anim) => {
225
+ const duration = anim.duration ? ` (${anim.duration.toFixed(1)}s)` : '';
226
+ console.log(`- ${anim.id || anim.name}: ${anim.name}${duration}`);
369
227
  });
370
- };
371
- return CommandParser;
372
- }());
373
- exports.CommandParser = CommandParser;
228
+ return { success: true };
229
+ }
230
+ }