decord/stable/source/modules/channel/useVoiceChannelStartTime.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

48 lines
2.1 KiB
TypeScript

// Module ID: 16575
// Function ID: 16576
// Name: useVoiceChannelStartTime
// Dependencies: [19, 5526, 5138, 11600, 1074, 504, 11761, 2]
// Exports: useStartTime
// Module 16575 (useVoiceChannelStartTime)
import ChannelInfoActionCreators from "ChannelInfoActionCreators" /* 11761 */;
import noop from "module_19" /* 19 */;
import GatewayConnectionStore from "GatewayConnectionStore" /* 5526 */;
import GuildAvailabilityStore from "GuildAvailabilityStore" /* 5138 */;
import VoiceChannelStartTimeStore from "VoiceChannelStartTimeStore" /* 11600 */;
const require = globalThis.__r;
require = fn;
const ChannelTypes = fn(1074).ChannelTypes;
const size = fn(2);
const result = size.fileFinishedImporting("modules/channel/useVoiceChannelStartTime.tsx");
export const useStartTime = function useStartTime(channel) {
_require = channel;
const items = [VoiceChannelStartTimeStore, closure_4];
const stateFromStoresObject = require("initialize").useStateFromStoresObject(items, () => ({ hasRequestedStartTimes: VoiceChannelStartTimeStore.hasRequestedStartTimes(channel.guild_id), startTime: VoiceChannelStartTimeStore.getStartTime(channel), isGuildUnavailable: GuildAvailabilityStore.isUnavailable(channel.guild_id) }));
hasRequestedStartTimes = stateFromStoresObject.hasRequestedStartTimes;
const isGuildUnavailable = stateFromStoresObject.isGuildUnavailable;
let obj = require("initialize");
const items1 = [stateFromStores];
stateFromStores = require("initialize").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 = ChannelInfoActionCreators.fetchChannelInfo(channel.guild_id);
}
}, items2);
return stateFromStoresObject.startTime;
};