add missing returns

This commit is contained in:
LenAnderson
2024-04-24 19:09:35 -04:00
parent c089e049d6
commit f6faec1786
9 changed files with 12 additions and 0 deletions

View File

@ -497,6 +497,7 @@ jQuery(function () {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'caption', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'caption',
callback: captionCommandCallback, callback: captionCommandCallback,
returns: 'caption',
namedArgumentList: [ namedArgumentList: [
new SlashCommandNamedArgument( new SlashCommandNamedArgument(
'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false', ['true', 'false'], 'quiet', 'suppress sending a captioned message', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false', ['true', 'false'],

View File

@ -1994,6 +1994,7 @@ function migrateSettings() {
})); }));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'lastsprite', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'lastsprite',
callback: (_, value) => lastExpression[value.trim()] ?? '', callback: (_, value) => lastExpression[value.trim()] ?? '',
returns: 'sprite'
unnamedArgumentList: [ unnamedArgumentList: [
new SlashCommandArgument( new SlashCommandArgument(
'charName', [ARGUMENT_TYPE.STRING], true, 'charName', [ARGUMENT_TYPE.STRING], true,

View File

@ -428,6 +428,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'show-gallery
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'list-gallery',
aliases: ['lg'], aliases: ['lg'],
callback: listGalleryCommand, callback: listGalleryCommand,
returns: 'list of images',
namedArgumentList: [ namedArgumentList: [
new SlashCommandNamedArgument( new SlashCommandNamedArgument(
'char', 'character name', [ARGUMENT_TYPE.STRING], false, 'char', 'character name', [ARGUMENT_TYPE.STRING], false,

View File

@ -122,6 +122,7 @@ export class SlashCommandHandler {
})); }));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'qr-set-list', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'qr-set-list',
callback: (_, value) => this.listSets(value ?? 'all'), callback: (_, value) => this.listSets(value ?? 'all'),
returns: 'list of QR sets',
namedArgumentList: [], namedArgumentList: [],
unnamedArgumentList: [ unnamedArgumentList: [
new SlashCommandArgument( new SlashCommandArgument(
@ -132,6 +133,7 @@ export class SlashCommandHandler {
})); }));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'qr-list', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'qr-list',
callback: (_, value) => this.listQuickReplies(value), callback: (_, value) => this.listQuickReplies(value),
returns: 'list of QRs',
namedArgumentList: [], namedArgumentList: [],
unnamedArgumentList: [ unnamedArgumentList: [
new SlashCommandArgument( new SlashCommandArgument(

View File

@ -358,6 +358,7 @@ jQuery(async () => {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'regex', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'regex',
callback: runRegexCallback, callback: runRegexCallback,
returns: 'replaced text',
namedArgumentList: [ namedArgumentList: [
new SlashCommandNamedArgument( new SlashCommandNamedArgument(
'name', 'script name', [ARGUMENT_TYPE.STRING], true, 'name', 'script name', [ARGUMENT_TYPE.STRING], true,

View File

@ -135,6 +135,7 @@ jQuery(() => {
$('#token_counter').on('click', doTokenCounter); $('#token_counter').on('click', doTokenCounter);
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'count', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'count',
callback: doCount, callback: doCount,
returns: 'number of tokens',
helpString: 'Counts the number of tokens in the current chat.', helpString: 'Counts the number of tokens in the current chat.',
interruptsGeneration: true, interruptsGeneration: true,
purgeFromMessage: false, purgeFromMessage: false,

View File

@ -4297,6 +4297,7 @@ function runProxyCallback(_, value) {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'proxy', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'proxy',
callback: runProxyCallback, callback: runProxyCallback,
returns: 'current proxy',
namedArgumentList: [], namedArgumentList: [],
unnamedArgumentList: [ unnamedArgumentList: [
new SlashCommandArgument( new SlashCommandArgument(

View File

@ -475,6 +475,7 @@ export async function initPresetManager() {
registerPresetManagers(); registerPresetManagers();
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'preset', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'preset',
callback: presetCommandCallback, callback: presetCommandCallback,
returns: 'current preset',
namedArgumentList: [], namedArgumentList: [],
unnamedArgumentList: [ unnamedArgumentList: [
new SlashCommandArgument( new SlashCommandArgument(

View File

@ -619,6 +619,7 @@ function registerWorldInfoSlashCommands() {
})); }));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'getchatbook', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'getchatbook',
callback: getChatBookCallback, callback: getChatBookCallback,
returns: 'lorebook name',
helpString: 'Get a name of the chat-bound lorebook or create a new one if was unbound, and pass it down the pipe.', helpString: 'Get a name of the chat-bound lorebook or create a new one if was unbound, and pass it down the pipe.',
aliases: ['getchatlore', 'getchatwi'], aliases: ['getchatlore', 'getchatwi'],
interruptsGeneration: true, interruptsGeneration: true,
@ -626,6 +627,7 @@ function registerWorldInfoSlashCommands() {
})); }));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'findentry', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'findentry',
aliases: ['findlore', 'findwi'], aliases: ['findlore', 'findwi'],
returns: 'UID',
callback: findBookEntryCallback, callback: findBookEntryCallback,
namedArgumentList: [ namedArgumentList: [
new SlashCommandNamedArgument( new SlashCommandNamedArgument(
@ -659,6 +661,7 @@ function registerWorldInfoSlashCommands() {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'getentryfield', SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'getentryfield',
aliases: ['getlorefield', 'getwifield'], aliases: ['getlorefield', 'getwifield'],
callback: getEntryFieldCallback, callback: getEntryFieldCallback,
returns: 'field value',
namedArgumentList: [ namedArgumentList: [
new SlashCommandNamedArgument( new SlashCommandNamedArgument(
'file', 'bookName', ARGUMENT_TYPE.STRING, true, 'file', 'bookName', ARGUMENT_TYPE.STRING, true,