Add /classify-expressions to retrieve emote list
| @@ -1354,7 +1354,7 @@ function getCachedExpressions() { | ||
| 1354 | 1354 | return [...expressionsList, ...extension_settings.expressions.custom].filter(onlyUnique); |
| 1355 | 1355 | } |
| 1356 | 1356 | |
| 1357 | 1357 | export async function getExpressionsList() { |
| 1358 | 1358 | // Return cached list if available |
| 1359 | 1359 | if (Array.isArray(expressionsList)) { |
| 1360 | 1360 | return getCachedExpressions(); |
| @@ -2085,7 +2085,7 @@ function migrateSettings() { | ||
| 2085 | 2085 | }), |
| 2086 | 2086 | ], |
| 2087 | 2087 | helpString: 'Force sets the sprite for the current character.', |
| 2088 | 2088 | returns: 'the currently set sprite label after setting it.', |
| 2089 | 2089 | })); |
| 2090 | 2090 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 2091 | 2091 | name: 'spriteoverride', |
| @@ -2101,7 +2101,7 @@ function migrateSettings() { | ||
| 2101 | 2101 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 2102 | 2102 | name: 'lastsprite', |
| 2103 | 2103 | callback: (_, value) => lastExpression[String(value).trim()] ?? '', |
| 2104 | - returns: 'sprite', | |
| 2104 | + returns: 'the last set sprite / expression for the named character.', | |
| 2105 | 2105 | unnamedArgumentList: [ |
| 2106 | 2106 | SlashCommandArgument.fromProps({ |
| 2107 | 2107 | description: 'character name', |
| @@ -2117,7 +2117,14 @@ function migrateSettings() { | ||
| 2117 | 2117 | callback: toggleTalkingHeadCommand, |
| 2118 | 2118 | aliases: ['talkinghead'], |
| 2119 | 2119 | helpString: 'Character Expressions: toggles <i>Image Type - talkinghead (extras)</i> on/off.', |
| 2120 | - returns: ARGUMENT_TYPE.BOOLEAN, | |
| 2120 | + returns: 'the current state of the <i>Image Type - talkinghead (extras)</i> on/off.', | |
| 2121 | + })); | |
| 2122 | + SlashCommandParser.addCommandObject(SlashCommand.fromProps({ | |
| 2123 | + name: 'classify-expressions', | |
| 2124 | + aliases: ['expressions'], | |
| 2125 | + callback: async () => (await getExpressionsList()).join(', '), | |
| 2126 | + returns: 'The comma-separated list of available expressions, including custom expressions.', | |
| 2127 | + helpString: 'Returns a list of available expressions, including custom expressions.', | |
| 2121 | 2128 | })); |
| 2122 | 2129 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 2123 | 2130 | name: 'classify', |