decord/beta/source/modules/user_profile/useBotProfileCommands.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

42 lines
1.5 KiB
TypeScript

// Module ID: 10780
// Function ID: 10781
// Name: useBotProfileCommands
// Dependencies: [19, 8719, 1979, 2]
// Exports: default
// Module 10780 (useBotProfileCommands)
import ApplicationCommandQueryApiAll from "ApplicationCommandQueryApi" /* 8719 */;
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;
};