Fix type errors in command registration

0f93caa4271ed8107904be5f9cd10d8a37111437

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +12 -5Showing whitespace changes
public/scripts/extensions/expressions/index.js+12 -5
@@ -2281,9 +2281,9 @@ function migrateSettings() {
2281 }));2281 }));
2282 SlashCommandParser.addCommandObject(SlashCommand.fromProps({2282 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
2283 name: 'uploadsprite',2283 name: 'uploadsprite',
2284 description: 'Upload a sprite',
2285 callback: async (args, url) => {2284 callback: async (args, url) => {
2286 await uploadSpriteCommand(args, url);2285 await uploadSpriteCommand(args, url);
2286 return '';
2287 },2287 },
2288 unnamedArgumentList: [2288 unnamedArgumentList: [
2289 SlashCommandArgument.fromProps({2289 SlashCommandArgument.fromProps({
@@ -2296,19 +2296,26 @@ function migrateSettings() {
2296 SlashCommandNamedArgument.fromProps({2296 SlashCommandNamedArgument.fromProps({
2297 name: 'name',2297 name: 'name',
2298 description: 'Character name or avatar key (default is current character)',2298 description: 'Character name or avatar key (default is current character)',
2299 type: ARGUMENT_TYPE.STRING,2299 typeList: [ARGUMENT_TYPE.STRING],
2300 isRequired: false,
2301 acceptsMultiple: false,
2300 }),2302 }),
2301 SlashCommandNamedArgument.fromProps({2303 SlashCommandNamedArgument.fromProps({
2302 name: 'label',2304 name: 'label',
2303 description: 'Sprite label/expression name',2305 description: 'Sprite label/expression name',
2304 type: ARGUMENT_TYPE.STRING,2306 typeList: [ARGUMENT_TYPE.STRING],
2307 enumProvider: localEnumProviders.expressions,
2308 isRequired: true,
2309 acceptsMultiple: false,
2305 }),2310 }),
2306 SlashCommandNamedArgument.fromProps({2311 SlashCommandNamedArgument.fromProps({
2307 name: 'folder',2312 name: 'folder',
2308 description: 'Override folder to upload into',2313 description: 'Override folder to upload into',
2309 type: ARGUMENT_TYPE.STRING,2314 typeList: [ARGUMENT_TYPE.STRING],
2315 isRequired: false,
2316 acceptsMultiple: false,
2310 }),2317 }),
2311 ],2318 ],
2312 helpString: 'Upload a sprite from a URL. Example: /uploadsprite name=Seraphina label=happy /user/images/Seraphina/Seraphina_2024-12-22@12h37m57s.png',2319 helpString: '<div>Upload a sprite from a URL.</div><div>Example:</div><pre><code>/uploadsprite name=Seraphina label=joy /user/images/Seraphina/Seraphina_2024-12-22@12h37m57s.png</code></pre>',
2313 }));2320 }));
2314})();2321})();