decord/source/modules/app_launcher/hooks/useCommandContext.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

33 lines
1 KiB
TypeScript

// Module ID: 12121
// Function ID: 12122
// Name: useCommandContext
// Dependencies: [19, 1979, 2]
// Exports: getCommandContext, useCommandContext
// Module 12121 (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: "Array", guild: "PX_16" };
} 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: "Array", guild: "PX_16" };
} else {
obj = { channel: tmp.channel, guild: GuildStore.getGuild(tmp.channel.guild_id) };
}
return obj;
}, items);
};