decord/source/modules/user_profile/useBotProfileCommands.tsx

49 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-07-21 06:55:02 +00:00
// Module ID: 11877
2026-07-21 22:01:30 +00:00
// Function ID: 91946
2026-07-20 16:05:17 +00:00
// Name: useBotProfileCommands
2026-07-21 06:55:02 +00:00
// Dependencies: [1194, 4213, 653, 566]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-21 06:55:02 +00:00
// Module 11877 (useBotProfileCommands)
2026-07-20 16:05:17 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import initialize from "initialize";
const result = initialize.fileFinishedImporting("modules/user_profile/useBotProfileCommands.tsx");
export default function useBotProfileCommands(channel) {
let obj = importAll(dependencyMap[1]);
const accessibleCommandsForApplication = obj.useAccessibleCommandsForApplication(channel, arg1, arg2);
const commands = accessibleCommandsForApplication.commands;
const arg1 = commands;
obj = {
application: accessibleCommandsForApplication.application,
commands: React.useMemo(() => {
let found;
if (null != commands) {
found = commands.filter((nsfw) => {
let tmp = true !== nsfw.nsfw;
if (tmp) {
const options = nsfw.options;
let found;
if (null != options) {
found = options.find((type) => {
type = type.type;
let tmp = type === callback(closure_2[2]).ApplicationCommandOptionType.SUB_COMMAND;
if (!tmp) {
tmp = type === callback(closure_2[2]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
}
return tmp;
});
}
tmp = null == found;
}
return tmp;
});
}
return found;
}, items)
};
const items = [commands];
return obj;
};