decord/beta/source/modules/user_profile/useBotProfileCommands.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

42 lines
1.5 KiB
TypeScript

// Module ID: 11347
// Function ID: 11348
// Name: useBotProfileCommands
// Dependencies: [19, 9546, 1894, 2]
// Exports: default
// Module 11347 (useBotProfileCommands)
import ApplicationCommandQueryApiAll from "ApplicationCommandQueryApi" /* 9546 */;
import noop from "module_19" /* 19 */;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/useBotProfileCommands.tsx");
export default function useBotProfileCommands(channel, arg1, arg2) {
const accessibleCommandsForApplication = ApplicationCommandQueryApiAll.useAccessibleCommandsForApplication(channel, arg1, arg2);
const commands = accessibleCommandsForApplication.commands;
const obj2 = { application: accessibleCommandsForApplication.application, commands: null };
const items = [commands];
obj2.commands = noop.useMemo(() => {
let found;
if (commands != null) {
found = commands.filter((nsfw) => {
let tmp = true !== nsfw.nsfw;
if (tmp) {
const options = nsfw.options;
let found;
if (options != null) {
found = options.find((type) => {
type = type.type;
return type === closure_1_0(dependencyMap[2]).ApplicationCommandOptionType.SUB_COMMAND || type === closure_1_0(dependencyMap[2]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
});
}
tmp = null == found;
}
return tmp;
});
}
return found;
}, items);
return obj2;
};