decord/source/modules/channel/useVoiceChannelStartTime.tsx
2026-08-25 06:04:03 +00:00

45 lines
1.9 KiB
TypeScript

// Module ID: 15590
// Function ID: 15591
// Name: useStartTime
// Dependencies: [19, 5102, 4743, 10478, 676, 589, 10525, 2]
// Exports: useStartTime
// Module 15590 (useStartTime)
import closure_2 from "noop" /* 19 */;
import closure_3 from "_handleConnectionOpen" /* 5102 */;
import closure_4 from "handleConnectionOpen" /* 4743 */;
import closure_5 from "_toTimestampMs" /* 10478 */;
import { ChannelTypes } from "ME" /* 676 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/channel/useVoiceChannelStartTime.tsx");
export const useStartTime = function useStartTime(channel) {
const _require = channel;
const items = [closure_5, closure_4];
const stateFromStoresObject = _require(hasRequestedStartTimes[5]).useStateFromStoresObject(items, () => ({ hasRequestedStartTimes: closure_1_5.hasRequestedStartTimes(channel.guild_id), startTime: closure_1_5.getStartTime(channel), isGuildUnavailable: unavailable.isUnavailable(channel.guild_id) }));
hasRequestedStartTimes = stateFromStoresObject.hasRequestedStartTimes;
const isGuildUnavailable = stateFromStoresObject.isGuildUnavailable;
let obj = _require(hasRequestedStartTimes[5]);
const items1 = [stateFromStores];
stateFromStores = _require(hasRequestedStartTimes[5]).useStateFromStores(items1, () => stateFromStores.isConnected());
closure_4 = tmp3;
const items2 = [channel.type === ChannelTypes.GUILD_VOICE, channel.guild_id, hasRequestedStartTimes, isGuildUnavailable, stateFromStores];
const effect = isGuildUnavailable.useEffect(() => {
let tmp = !hasRequestedStartTimes;
if (!hasRequestedStartTimes) {
tmp = closure_4;
}
if (tmp) {
tmp = !isGuildUnavailable;
}
if (tmp) {
tmp = stateFromStores;
}
if (tmp) {
const channelInfo = channel(hasRequestedStartTimes[6]).fetchChannelInfo(channel.guild_id);
const obj = channel(hasRequestedStartTimes[6]);
}
}, items2);
return stateFromStoresObject.startTime;
};