Update /bg docs to match the actual command

This commit is contained in:
Wolfsblvt
2024-07-28 01:17:11 +02:00
parent c2e6903b30
commit 6b1045ab52

View File

@ -139,9 +139,8 @@ export function initDefaultSlashCommands() {
returns: 'the current background', returns: 'the current background',
unnamedArgumentList: [ unnamedArgumentList: [
SlashCommandArgument.fromProps({ SlashCommandArgument.fromProps({
description: 'filename', description: 'background filename',
typeList: [ARGUMENT_TYPE.STRING], typeList: [ARGUMENT_TYPE.STRING],
isRequired: true,
enumProvider: () => [...document.querySelectorAll('.bg_example')] enumProvider: () => [...document.querySelectorAll('.bg_example')]
.map(it => new SlashCommandEnumValue(it.getAttribute('bgfile'))) .map(it => new SlashCommandEnumValue(it.getAttribute('bgfile')))
.filter(it => it.value?.length), .filter(it => it.value?.length),
@ -151,12 +150,18 @@ export function initDefaultSlashCommands() {
<div> <div>
Sets a background according to the provided filename. Partial names allowed. Sets a background according to the provided filename. Partial names allowed.
</div> </div>
<div>
If no background is provided, this will return the currently selected background.
</div>
<div> <div>
<strong>Example:</strong> <strong>Example:</strong>
<ul> <ul>
<li> <li>
<pre><code>/bg beach.jpg</code></pre> <pre><code>/bg beach.jpg</code></pre>
</li> </li>
<li>
<pre><code>/bg</code></pre>
</li>
</ul> </ul>
</div> </div>
`, `,