From 8cbb80f44f38d2cc5cd7959d7736254e03210123 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Thu, 11 Jul 2024 22:43:56 +0200 Subject: [PATCH] Change 'world' enum provider query field, not UI --- .../scripts/slash-commands/SlashCommandCommonEnumsProvider.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js b/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js index 683f28ffa..6cc007156 100644 --- a/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js +++ b/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js @@ -3,6 +3,7 @@ import { extension_settings } from "../extensions.js"; import { getGroupMembers, groups, selected_group } from "../group-chats.js"; import { power_user } from "../power-user.js"; import { searchCharByName, getTagsList, tags } from "../tags.js"; +import { world_names } from '../world-info.js'; import { SlashCommandClosure } from "./SlashCommandClosure.js"; import { SlashCommandEnumValue, enumTypes } from "./SlashCommandEnumValue.js"; import { SlashCommandExecutor } from "./SlashCommandExecutor.js"; @@ -213,7 +214,7 @@ export const commonEnumProviders = { * * @returns {SlashCommandEnumValue[]} */ - worlds: () => $('#world_info').children().toArray().map(x => new SlashCommandEnumValue(x.textContent, null, enumTypes.name, enumIcons.world)), + worlds: () => world_names.map(worldName => new SlashCommandEnumValue(worldName, null, enumTypes.name, enumIcons.world)), /** * All existing injects for the current chat