decord/source/modules/channel/useVoiceChannelStartTime.tsx

46 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15558
// Function ID: 15559
2026-07-20 16:05:17 +00:00
// Name: useStartTime
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 4499, 4831, 10548, 676, 589, 10717, 2]
2026-07-20 16:05:17 +00:00
// Exports: useStartTime
2026-08-24 06:08:38 +00:00
// Module 15558 (useStartTime)
import closure_2 from "noop" /* 19 */;
import closure_3 from "_handleConnectionOpen" /* 4499 */;
import closure_4 from "handleConnectionOpen" /* 4831 */;
import closure_5 from "_toTimestampMs" /* 10548 */;
import { ChannelTypes } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/channel/useVoiceChannelStartTime.tsx");
2026-07-20 16:05:17 +00:00
export const useStartTime = function useStartTime(channel) {
2026-07-23 10:11:24 +00:00
const _require = channel;
2026-08-24 06:08:38 +00:00
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) }));
2026-07-23 10:11:24 +00:00
hasRequestedStartTimes = stateFromStoresObject.hasRequestedStartTimes;
2026-07-20 16:05:17 +00:00
const isGuildUnavailable = stateFromStoresObject.isGuildUnavailable;
2026-07-25 08:10:48 +00:00
let obj = _require(hasRequestedStartTimes[5]);
const items1 = [stateFromStores];
stateFromStores = _require(hasRequestedStartTimes[5]).useStateFromStores(items1, () => stateFromStores.isConnected());
2026-08-24 06:08:38 +00:00
closure_4 = tmp3;
2026-07-25 08:10:48 +00:00
const items2 = [channel.type === ChannelTypes.GUILD_VOICE, channel.guild_id, hasRequestedStartTimes, isGuildUnavailable, stateFromStores];
2026-07-23 10:11:24 +00:00
const effect = isGuildUnavailable.useEffect(() => {
2026-07-29 08:29:29 +00:00
let tmp = !hasRequestedStartTimes;
if (!hasRequestedStartTimes) {
2026-08-24 06:08:38 +00:00
tmp = closure_4;
2026-07-29 08:29:29 +00:00
}
2026-07-25 08:10:48 +00:00
if (tmp) {
tmp = !isGuildUnavailable;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
if (tmp) {
tmp = stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
if (tmp) {
const channelInfo = channel(hasRequestedStartTimes[6]).fetchChannelInfo(channel.guild_id);
const obj = channel(hasRequestedStartTimes[6]);
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
}, items2);
2026-07-20 16:05:17 +00:00
return stateFromStoresObject.startTime;
};