Even more enum refactorings (not done yet)

- Add common enum icons
- enum def for existing enum types, with color description
This commit is contained in:
Wolfsblvt
2024-06-20 20:33:45 +02:00
parent 7f7ecdcca8
commit 461b1a9d87
18 changed files with 462 additions and 137 deletions

View File

@ -9,6 +9,7 @@ import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';
import { SlashCommand } from '../../slash-commands/SlashCommand.js';
import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js';
import { SlashCommandEnumValue } from '../../slash-commands/SlashCommandEnumValue.js';
import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js';
export { MODULE_NAME };
const MODULE_NAME = 'caption';
@ -452,7 +453,7 @@ jQuery(async function () {
name: 'id',
description: 'get image from a message with this ID',
typeList: [ARGUMENT_TYPE.NUMBER],
enumProvider: () => getContext().chat.map((_, i) => new SlashCommandEnumValue(String(i), null, 'number', '1⃣')),
enumProvider: commonEnumProviders.messages,
}),
],
unnamedArgumentList: [