decord/source/modules/user_profile/useBotProfileCommands.tsx
2026-09-01 10:26:29 +00:00

44 lines
1.4 KiB
TypeScript

// Module ID: 9042
// Function ID: 9043
// Name: useBotProfileCommands
// Dependencies: [19, 8443, 1955, 2]
// Exports: default
// Module 9042 (useBotProfileCommands)
import findCommandInSectionAll from "findCommandInSection" /* 8443 */;
import closure_3 from "noop" /* 19 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/user_profile/useBotProfileCommands.tsx");
export default function useBotProfileCommands(channel) {
let obj = findCommandInSectionAll;
const accessibleCommandsForApplication = obj.useAccessibleCommandsForApplication(channel, arg1, arg2);
const commands = accessibleCommandsForApplication.commands;
obj = {
application: accessibleCommandsForApplication.application,
commands: React.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 === callback(table[2]).ApplicationCommandOptionType.SUB_COMMAND || type === callback(table[2]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
});
}
tmp = null == found;
}
return tmp;
});
}
return found;
}, items)
};
items = [commands];
return obj;
};