Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
userSetting: false,
defaultUserFacingValue: 'Enabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
{
userFacingName: 'Internet decks enabled',
description: 'This setting controls whether decks imported from the internet may be used in this channel. If enabled, it is possible that someone will load a deck containing disagreeable content in this channel.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'quiz/japanese/internet_decks_enabled',
userSetting: false,
defaultUserFacingValue: 'Enabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
],
},
{
userFacingName: 'Fonts',
children:
[
{
userFacingName: 'Quiz font',
description: 'This setting controls the font used for text rendered for quizzes.',
allowedValuesDescription: availableFontsAllowedValuesString,
uniqueId: 'quiz_font',
defaultUserFacingValue: 'Noto Sans CJK',
convertUserFacingValueToInternalValue: SettingsConverters.createMapConverter(
fontForInput,
true,
uniqueId: 'quiz/japanese/additional_answer_wait_time',
defaultUserFacingValue: '2.15',
convertUserFacingValueToInternalValue: SettingsConverters.stringToFloat,
convertInternalValueToUserFacingValue: SettingsConverters.toString,
validateInternalValue: SettingsValidators.createRangeValidator(0, 120),
},
{
userFacingName: 'Conquest and Inferno modes enabled',
description: 'This setting controls whether Conquest and Inferno mode quizzes can be run. Say k!quiz-conquest and k!quiz-inferno to find out more about what those are. Since only the person who started a Conquest or Inferno mode quiz or a server admin can stop it, it has potential to be disruptive if not controlled, so it is disabled by default.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'quiz/japanese/conquest_and_inferno_enabled',
userSetting: false,
defaultUserFacingValue: 'Enabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
{
userFacingName: 'Internet decks enabled',
description: 'This setting controls whether decks imported from the internet may be used in this channel. If enabled, it is possible that someone will load a deck containing disagreeable content in this channel.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'quiz/japanese/internet_decks_enabled',
userSetting: false,
defaultUserFacingValue: 'Enabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
],
},
{
userFacingName: 'Fonts',
uniqueId: 'quiz/japanese/additional_answer_wait_time',
defaultUserFacingValue: '2.15',
convertUserFacingValueToInternalValue: SettingsConverters.stringToFloat,
convertInternalValueToUserFacingValue: SettingsConverters.toString,
validateInternalValue: SettingsValidators.createRangeValidator(0, 120),
},
{
userFacingName: 'Conquest and Inferno modes enabled',
description: 'This setting controls whether Conquest and Inferno mode quizzes can be run. Say k!quiz-conquest and k!quiz-inferno to find out more about what those are. Since only the person who started a Conquest or Inferno mode quiz or a server admin can stop it, it has potential to be disruptive if not controlled, so it is disabled by default.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'quiz/japanese/conquest_and_inferno_enabled',
userSetting: false,
defaultUserFacingValue: 'Enabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
{
userFacingName: 'Internet decks enabled',
description: 'This setting controls whether decks imported from the internet may be used in this channel. If enabled, it is possible that someone will load a deck containing disagreeable content in this channel.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'quiz/japanese/internet_decks_enabled',
userSetting: false,
defaultUserFacingValue: 'Disabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
},
],
},
{
userFacingName: 'Fonts',
},
{
userFacingName: 'Shiritori Forever',
children:
[
{
userFacingName: 'Shiritori Forever enabled',
description: 'Control whether Shiritori Forever is enabled, and where. After you change the setting, you will be asked where to apply it.',
allowedValuesDescription: 'Either **enabled** or **disabled**',
uniqueId: 'shiritoriforever',
userSetting: false,
serverSetting: false,
defaultUserFacingValue: 'Disabled',
convertUserFacingValueToInternalValue: SettingsConverters.createStringToBooleanConverter('enabled', 'disabled'),
convertInternalValueToUserFacingValue: SettingsConverters.createBooleanToStringConverter('Enabled', 'Disabled'),
validateInternalValue: SettingsValidators.isBoolean,
onChannelSettingChanged: onShiritoriForeverEnabledChanged,
},
],
},
];