decord/source/modules/user_profile/useBotProfileCommands.tsx

48 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 11893
// Function ID: 92056
2026-07-20 16:05:17 +00:00
// Name: useBotProfileCommands
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 7962, 1882, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 11893 (useBotProfileCommands)
2026-07-23 10:11:24 +00:00
import result from "result";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("PermissionOverwriteType").fileFinishedImporting("modules/user_profile/useBotProfileCommands.tsx");
2026-07-20 16:05:17 +00:00
export default function useBotProfileCommands(channel) {
2026-07-25 08:10:48 +00:00
let obj = importAll(7962);
2026-07-20 16:05:17 +00:00
const accessibleCommandsForApplication = obj.useAccessibleCommandsForApplication(channel, arg1, arg2);
const commands = accessibleCommandsForApplication.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;
2026-07-23 10:11:24 +00:00
let tmp = type === commands(outer3_2[2]).ApplicationCommandOptionType.SUB_COMMAND;
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-07-23 10:11:24 +00:00
tmp = type === commands(outer3_2[2]).ApplicationCommandOptionType.SUB_COMMAND_GROUP;
2026-07-20 16:05:17 +00:00
}
return tmp;
});
}
tmp = null == found;
}
return tmp;
});
}
return found;
}, items)
};
2026-07-23 10:11:24 +00:00
items = [commands];
2026-07-20 16:05:17 +00:00
return obj;
};