decord/source/modules/application_commands/native/ApplicationCommandValidationUtils.tsx

37 lines
983 B
TypeScript
Raw Normal View History

// Module ID: 12287
// Function ID: 12288
// Name: application_commands/ApplicationCommandValidationUtils
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: getFirstInvalidOption
// Module 12287 (application_commands/ApplicationCommandValidationUtils)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/application_commands/native/ApplicationCommandValidationUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getFirstInvalidOption = function getFirstInvalidOption(activeCommand, first2) {
2026-07-20 16:05:17 +00:00
const options = activeCommand.options;
if (null == options) {
return null;
} else {
2026-07-29 08:29:29 +00:00
for (const item10010 of options) {
let tmp4 = arg1[item10010.name];
let tmp3 = item10010;
if (item10010.required) {
if (null == tmp4) {
obj.return();
return item10010;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
if (null != tmp4) {
if (!tmp4.success) {
obj.return();
return tmp3;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
return null;
}
};