mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-03 19:37:46 +01:00
Update /len command help
This commit is contained in:
parent
93935e9e9c
commit
a357654c10
@ -1874,21 +1874,31 @@ export function registerVariableCommands() {
|
|||||||
unnamedArgumentList: [
|
unnamedArgumentList: [
|
||||||
SlashCommandArgument.fromProps({
|
SlashCommandArgument.fromProps({
|
||||||
description: 'value',
|
description: 'value',
|
||||||
typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME],
|
typeList: [ARGUMENT_TYPE.STRING, ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.LIST, ARGUMENT_TYPE.DICTIONARY],
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
enumProvider: commonEnumProviders.variables('all'),
|
|
||||||
forceEnum: false,
|
forceEnum: false,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
helpString: `
|
helpString: `
|
||||||
<div>
|
<div>
|
||||||
Gets the length of a value and passes the result down the pipe. Can use variable names.
|
Gets the length of a value and passes the result down the pipe.
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
For strings, returns the number of characters.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
For lists and dictionaries, returns the number of elements.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
For numbers, returns the number of digits (including the sign and decimal point).
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Example:</strong>
|
<strong>Example:</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<pre><code class="language-stscript">/len i</code></pre>
|
<pre><code class="language-stscript">/len Lorem ipsum | /echo</code></pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user