forceEnum:false as default & enum icon changes
- Set forceEnum to false, for now - Switch some icons around
This commit is contained in:
parent
abb186db01
commit
c6c8f91c99
|
@ -84,7 +84,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
||||||
typeList: [ARGUMENT_TYPE.STRING],
|
typeList: [ARGUMENT_TYPE.STRING],
|
||||||
enumList: [
|
enumList: [
|
||||||
new SlashCommandEnumValue('slash', 'slash commands (STscript)', enumTypes.command, '/'),
|
new SlashCommandEnumValue('slash', 'slash commands (STscript)', enumTypes.command, '/'),
|
||||||
new SlashCommandEnumValue('macros', '{{macros}} (text replacement)', enumTypes.macro, '{{'),
|
new SlashCommandEnumValue('macros', '{{macros}} (text replacement)', enumTypes.macro, enumIcons.macro),
|
||||||
new SlashCommandEnumValue('format', 'chat/text formatting', enumTypes.name, '★'),
|
new SlashCommandEnumValue('format', 'chat/text formatting', enumTypes.name, '★'),
|
||||||
new SlashCommandEnumValue('hotkeys', 'keyboard shortcuts', enumTypes.enum, '⏎'),
|
new SlashCommandEnumValue('hotkeys', 'keyboard shortcuts', enumTypes.enum, '⏎'),
|
||||||
],
|
],
|
||||||
|
|
|
@ -28,7 +28,7 @@ export class SlashCommandArgument {
|
||||||
* @param {string|SlashCommandClosure} [props.defaultValue=null] default value if no value is provided
|
* @param {string|SlashCommandClosure} [props.defaultValue=null] default value if no value is provided
|
||||||
* @param {string|SlashCommandEnumValue|(string|SlashCommandEnumValue)[]} [props.enumList=[]] list of accepted values
|
* @param {string|SlashCommandEnumValue|(string|SlashCommandEnumValue)[]} [props.enumList=[]] list of accepted values
|
||||||
* @param {(executor:SlashCommandExecutor)=>SlashCommandEnumValue[]} [props.enumProvider=null] function that returns auto complete options
|
* @param {(executor:SlashCommandExecutor)=>SlashCommandEnumValue[]} [props.enumProvider=null] function that returns auto complete options
|
||||||
* @param {boolean} [props.forceEnum=true] default: true - whether the input must match one of the enum values
|
* @param {boolean} [props.forceEnum=false] default: false - whether the input must match one of the enum values
|
||||||
*/
|
*/
|
||||||
static fromProps(props) {
|
static fromProps(props) {
|
||||||
return new SlashCommandArgument(
|
return new SlashCommandArgument(
|
||||||
|
@ -39,7 +39,7 @@ export class SlashCommandArgument {
|
||||||
props.defaultValue ?? null,
|
props.defaultValue ?? null,
|
||||||
props.enumList ?? [],
|
props.enumList ?? [],
|
||||||
props.enumProvider ?? null,
|
props.enumProvider ?? null,
|
||||||
props.forceEnum ?? true,
|
props.forceEnum ?? false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ export class SlashCommandArgument {
|
||||||
/**@type {string|SlashCommandClosure}*/ defaultValue;
|
/**@type {string|SlashCommandClosure}*/ defaultValue;
|
||||||
/**@type {SlashCommandEnumValue[]}*/ enumList = [];
|
/**@type {SlashCommandEnumValue[]}*/ enumList = [];
|
||||||
/**@type {(executor:SlashCommandExecutor)=>SlashCommandEnumValue[]}*/ enumProvider = null;
|
/**@type {(executor:SlashCommandExecutor)=>SlashCommandEnumValue[]}*/ enumProvider = null;
|
||||||
/**@type {boolean}*/ forceEnum = true;
|
/**@type {boolean}*/ forceEnum = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} description
|
* @param {string} description
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const enumIcons = {
|
||||||
default: '◊',
|
default: '◊',
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
variable: 'V',
|
variable: '𝑥',
|
||||||
localVariable: 'L',
|
localVariable: 'L',
|
||||||
globalVariable: 'G',
|
globalVariable: 'G',
|
||||||
scopeVariable: 'S',
|
scopeVariable: 'S',
|
||||||
|
@ -24,6 +24,8 @@ export const enumIcons = {
|
||||||
group: '🧑🤝🧑',
|
group: '🧑🤝🧑',
|
||||||
persona: '🧙♂️',
|
persona: '🧙♂️',
|
||||||
qr: 'QR',
|
qr: 'QR',
|
||||||
|
closure: '𝑓',
|
||||||
|
macro: '{{',
|
||||||
tag: '🏷️',
|
tag: '🏷️',
|
||||||
world: '🌐',
|
world: '🌐',
|
||||||
preset: '⚙️',
|
preset: '⚙️',
|
||||||
|
@ -37,10 +39,9 @@ export const enumIcons = {
|
||||||
boolean: '🔲',
|
boolean: '🔲',
|
||||||
string: '📝',
|
string: '📝',
|
||||||
number: '1️⃣',
|
number: '1️⃣',
|
||||||
array: '📦',
|
array: '[]',
|
||||||
enum: '📚',
|
enum: '📚',
|
||||||
dictionary: '📖',
|
dictionary: '{}',
|
||||||
closure: '🧩',
|
|
||||||
|
|
||||||
// Roles
|
// Roles
|
||||||
system: '⚙️',
|
system: '⚙️',
|
||||||
|
|
Loading…
Reference in New Issue