decord/source/modules/app_launcher/hooks/useCommandContext.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

33 lines
1 KiB
TypeScript

// Module ID: 12098
// Function ID: 12099
// Name: useCommandContext
// Dependencies: [19, 1979, 2]
// Exports: getCommandContext, useCommandContext
// Module 12098 (useCommandContext)
import noop from "module_19" /* 19 */;
import GuildStore from "GuildStore" /* 1979 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/app_launcher/hooks/useCommandContext.tsx");
export const getCommandContext = function getCommandContext(type) {
if ("contextless" === type.type) {
let obj = { channel: "call", guild: "accessibilityLabel" };
} else {
obj = { channel: type.channel, guild: GuildStore.getGuild(type.channel.guild_id) };
}
return obj;
};
export const useCommandContext = function useCommandContext(context) {
noop = context;
const items = [context];
return noop.useMemo(() => {
if ("contextless" === type.type) {
let obj = { channel: "call", guild: "accessibilityLabel" };
} else {
obj = { channel: tmp.channel, guild: GuildStore.getGuild(tmp.channel.guild_id) };
}
return obj;
}, items);
};