mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
clarify /help text for /bg command
This commit is contained in:
@ -73,8 +73,8 @@ const parser = new SlashCommandParser();
|
|||||||
const registerSlashCommand = parser.addCommand.bind(parser);
|
const registerSlashCommand = parser.addCommand.bind(parser);
|
||||||
const getSlashCommandsHelp = parser.getHelpString.bind(parser);
|
const getSlashCommandsHelp = parser.getHelpString.bind(parser);
|
||||||
|
|
||||||
parser.addCommand('help', helpCommandCallback, ['?'], ' – displays a help information', true, true);
|
parser.addCommand('help', helpCommandCallback, ['?'], ' – displays this help message', true, true);
|
||||||
parser.addCommand('bg', setBackgroundCallback, ['background'], '<span class="monospace">name</span> – sets a background by file name', false, true);
|
parser.addCommand('bg', setBackgroundCallback, ['background'], '<span class="monospace">(filename)</span> – sets a background according to filename, partial names allowed, will set the first one alphebetically if multiple files begin with the provided argument string', false, true);
|
||||||
|
|
||||||
function helpCommandCallback() {
|
function helpCommandCallback() {
|
||||||
sendSystemMessage(system_message_types.HELP);
|
sendSystemMessage(system_message_types.HELP);
|
||||||
@ -86,7 +86,7 @@ function setBackgroundCallback(_, bg) {
|
|||||||
}
|
}
|
||||||
console.log('Set background to ' + bg);
|
console.log('Set background to ' + bg);
|
||||||
const bgElement = $(`.bg_example[bgfile^="${bg.trim()}"`);
|
const bgElement = $(`.bg_example[bgfile^="${bg.trim()}"`);
|
||||||
|
|
||||||
if (bgElement.length) {
|
if (bgElement.length) {
|
||||||
bgElement.get(0).click();
|
bgElement.get(0).click();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user