decord/source/modules/app_launcher/hooks/useCommandContext.tsx

26 lines
815 B
TypeScript
Raw Normal View History

2026-07-21 06:55:02 +00:00
// Module ID: 11141
2026-07-21 22:01:30 +00:00
// Function ID: 86649
2026-07-20 16:05:17 +00:00
// Name: getCommandContext
// Dependencies: []
// Exports: useCommandContext
2026-07-21 06:55:02 +00:00
// Module 11141 (getCommandContext)
2026-07-20 16:05:17 +00:00
function getCommandContext(type) {
if ("contextless" === type.type) {
let obj = { channel: undefined, guild: undefined };
} else {
obj = { channel: type.channel, guild: guild.getGuild(type.channel.guild_id) };
}
return obj;
}
let closure_0 = importAll(dependencyMap[0]);
let closure_1 = importDefault(dependencyMap[1]);
const result = arg1(dependencyMap[2]).fileFinishedImporting("modules/app_launcher/hooks/useCommandContext.tsx");
export { getCommandContext };
export const useCommandContext = function useCommandContext(context) {
const React = context;
const items = [context];
return React.useMemo(() => callback(arg0), items);
};