Add rawQuotes to override with named arg (#4032)

This commit is contained in:
Cohee
2025-05-24 00:35:58 +03:00
committed by GitHub
parent d0bc58acf2
commit 36dfbd4cbe
3 changed files with 45 additions and 3 deletions

View File

@ -266,6 +266,14 @@ export function initDefaultSlashCommands() {
enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
forceEnum: true,
}),
SlashCommandNamedArgument.fromProps({
name: 'raw',
description: 'If true, does not alter quoted literal unnamed arguments',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumProvider: commonEnumProviders.boolean('trueFalse'),
isRequired: false,
}),
],
unnamedArgumentList: [
new SlashCommandArgument(
@ -328,6 +336,14 @@ export function initDefaultSlashCommands() {
enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
forceEnum: true,
}),
SlashCommandNamedArgument.fromProps({
name: 'raw',
description: 'If true, does not alter quoted literal unnamed arguments',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumProvider: commonEnumProviders.boolean('trueFalse'),
isRequired: false,
}),
],
unnamedArgumentList: [
new SlashCommandArgument(
@ -392,6 +408,14 @@ export function initDefaultSlashCommands() {
enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
forceEnum: true,
}),
SlashCommandNamedArgument.fromProps({
name: 'raw',
description: 'If true, does not alter quoted literal unnamed arguments',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumProvider: commonEnumProviders.boolean('trueFalse'),
isRequired: false,
}),
],
unnamedArgumentList: [
new SlashCommandArgument(
@ -617,6 +641,14 @@ export function initDefaultSlashCommands() {
enumList: slashCommandReturnHelper.enumList({ allowObject: true }),
forceEnum: true,
}),
SlashCommandNamedArgument.fromProps({
name: 'raw',
description: 'If true, does not alter quoted literal unnamed arguments',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumProvider: commonEnumProviders.boolean('trueFalse'),
isRequired: false,
}),
],
unnamedArgumentList: [
new SlashCommandArgument(
@ -1013,6 +1045,14 @@ export function initDefaultSlashCommands() {
description: 'a closure to call when the toast is clicked. This executed closure receives scope as provided in the script. Careful about possible side effects when manipulating variables and more.',
typeList: [ARGUMENT_TYPE.CLOSURE],
}),
SlashCommandNamedArgument.fromProps({
name: 'raw',
description: 'If true, does not alter quoted literal unnamed arguments',
typeList: [ARGUMENT_TYPE.BOOLEAN],
defaultValue: 'true',
enumProvider: commonEnumProviders.boolean('trueFalse'),
isRequired: false,
}),
],
unnamedArgumentList: [
new SlashCommandArgument(