decord/source/modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx

140 lines
5.9 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 15081
// Function ID: 114849
2026-07-20 16:05:17 +00:00
// Name: useGuildHasLiveChannelNotice
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 4952, 1353, 4150, 1348, 3759, 4204, 15082, 1354, 482, 15083, 566, 8259, 15084, 4964, 4958, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGuildHasLiveChannelNotice, useGuildLiveChannelNoticeInfo
2026-07-27 11:26:19 +00:00
// Module 15081 (useGuildHasLiveChannelNotice)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import closure_6 from "_isNativeReflectConstruct";
import closure_7 from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import closure_9 from "_isNativeReflectConstruct";
import closure_10 from "_isNativeReflectConstruct";
import { GuildScheduledEventEntityTypes as closure_11 } from "GUILD_EVENT_MAX_NAME_LENGTH";
import { Permissions } from "sum";
const require = arg1;
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx");
2026-07-20 16:05:17 +00:00
export const useGuildHasLiveChannelNotice = function useGuildHasLiveChannelNotice(id) {
2026-07-23 10:11:24 +00:00
const first = stateFromStores(guildActiveEvent[10])(id)[0];
2026-07-20 16:05:17 +00:00
id = undefined;
if (null != first) {
id = first.id;
}
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(id);
2026-07-20 16:05:17 +00:00
const items = [closure_5];
const items1 = [channel];
2026-07-23 10:11:24 +00:00
stateFromStores = channel(guildActiveEvent[11]).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let id;
if (null != channel) {
id = channel.id;
}
2026-07-23 10:11:24 +00:00
return outer1_5.getStageInstanceByChannel(id);
2026-07-20 16:05:17 +00:00
}, items1);
2026-07-23 10:11:24 +00:00
let obj = channel(guildActiveEvent[11]);
guildActiveEvent = channel(guildActiveEvent[12]).useGuildActiveEvent(id);
const obj2 = channel(guildActiveEvent[12]);
2026-07-20 16:05:17 +00:00
const items2 = [closure_10];
const items3 = [stateFromStores, guildActiveEvent];
2026-07-23 10:11:24 +00:00
const stateFromStoresObject = channel(guildActiveEvent[11]).useStateFromStoresObject(items2, () => {
2026-07-20 16:05:17 +00:00
let obj = {};
obj = {};
let id;
if (null != stateFromStores) {
id = stateFromStores.id;
}
obj.stageId = id;
2026-07-23 10:11:24 +00:00
obj.isStageNoticeHidden = outer1_10.isLiveChannelNoticeHidden(obj);
2026-07-20 16:05:17 +00:00
obj = {};
let id1;
if (null != guildActiveEvent) {
id1 = guildActiveEvent.id;
}
obj.eventId = id1;
2026-07-23 10:11:24 +00:00
obj.isEventNoticeHidden = outer1_10.isLiveChannelNoticeHidden(obj);
2026-07-20 16:05:17 +00:00
return obj;
}, items3);
const isStageNoticeHidden = stateFromStoresObject.isStageNoticeHidden;
if (null == guildActiveEvent) {
return null != stateFromStores && !isStageNoticeHidden;
}
};
export const useGuildLiveChannelNoticeInfo = function useGuildLiveChannelNoticeInfo(id) {
2026-07-23 10:11:24 +00:00
activeEventOrStageInstanceChannel = activeEventOrStageInstanceChannel(stateFromStores2[13]).useActiveEventOrStageInstanceChannel(id);
const obj = activeEventOrStageInstanceChannel(stateFromStores2[13]);
2026-07-20 16:05:17 +00:00
const items = [closure_8];
2026-07-23 10:11:24 +00:00
const stateFromStores = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let canResult = null != activeEventOrStageInstanceChannel;
if (canResult) {
2026-07-23 10:11:24 +00:00
canResult = outer1_8.can(outer1_12.CONNECT, activeEventOrStageInstanceChannel);
2026-07-20 16:05:17 +00:00
}
return canResult;
});
2026-07-23 10:11:24 +00:00
const obj2 = activeEventOrStageInstanceChannel(stateFromStores2[11]);
const guildActiveEvent = activeEventOrStageInstanceChannel(stateFromStores2[12]).useGuildActiveEvent(id);
const obj3 = activeEventOrStageInstanceChannel(stateFromStores2[12]);
const items1 = [entity_type];
2026-07-20 16:05:17 +00:00
const items2 = [activeEventOrStageInstanceChannel];
2026-07-23 10:11:24 +00:00
const stateFromStores1 = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items1, () => {
2026-07-20 16:05:17 +00:00
let id;
if (null != activeEventOrStageInstanceChannel) {
id = activeEventOrStageInstanceChannel.id;
}
return entity_type.getStageInstanceByChannel(id);
}, items2);
2026-07-23 10:11:24 +00:00
const obj4 = activeEventOrStageInstanceChannel(stateFromStores2[11]);
2026-07-20 16:05:17 +00:00
id = undefined;
if (null != activeEventOrStageInstanceChannel) {
id = activeEventOrStageInstanceChannel.id;
}
2026-07-23 10:11:24 +00:00
const tmp6 = activeEventOrStageInstanceChannel(stateFromStores2[14]).useActualStageSpeakerCount(id) > 0;
const obj5 = activeEventOrStageInstanceChannel(stateFromStores2[14]);
2026-07-20 16:05:17 +00:00
const items3 = [closure_9];
2026-07-23 10:11:24 +00:00
stateFromStores2 = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items3, () => {
2026-07-20 16:05:17 +00:00
let tmp = null != activeEventOrStageInstanceChannel;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = outer1_9.getVoiceStatesForChannel(activeEventOrStageInstanceChannel).length > 0;
2026-07-20 16:05:17 +00:00
}
return tmp;
});
2026-07-23 10:11:24 +00:00
stateFromStores2 = false;
2026-07-20 16:05:17 +00:00
if (null != activeEventOrStageInstanceChannel) {
if (null != stateFromStores1) {
2026-07-23 10:11:24 +00:00
stateFromStores2 = tmp6;
2026-07-20 16:05:17 +00:00
let flag = tmp6;
}
2026-07-23 10:11:24 +00:00
const items4 = [stateFromStores4];
2026-07-20 16:05:17 +00:00
const items5 = [activeEventOrStageInstanceChannel];
2026-07-23 10:11:24 +00:00
const stateFromStores3 = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items4, () => {
2026-07-20 16:05:17 +00:00
let tmp = null != activeEventOrStageInstanceChannel;
if (tmp) {
tmp = stateFromStores4.getParticipantCount(activeEventOrStageInstanceChannel.id, activeEventOrStageInstanceChannel(stateFromStores2[15]).StageChannelParticipantNamedIndex.AUDIENCE) > 0;
}
return tmp;
}, items5);
2026-07-23 10:11:24 +00:00
const obj7 = activeEventOrStageInstanceChannel(stateFromStores2[11]);
2026-07-20 16:05:17 +00:00
const items6 = [closure_6];
2026-07-23 10:11:24 +00:00
stateFromStores4 = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items6, () => {
2026-07-20 16:05:17 +00:00
let tmp = null != activeEventOrStageInstanceChannel;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = outer1_6.getAllApplicationStreamsForChannel(activeEventOrStageInstanceChannel.id).length > 0;
2026-07-20 16:05:17 +00:00
}
return tmp;
});
2026-07-23 10:11:24 +00:00
entity_type = undefined;
2026-07-20 16:05:17 +00:00
if (null != guildActiveEvent) {
entity_type = guildActiveEvent.entity_type;
}
const items7 = [stateFromStores, entity_type, flag, stateFromStores3, stateFromStores4];
2026-07-23 10:11:24 +00:00
return stateFromStores3.useMemo(() => ({ hasButton: tmp, hasSpeakers: stateFromStores2, hasAudience: stateFromStores3, hasStream: stateFromStores4 }), items7);
2026-07-20 16:05:17 +00:00
}
flag = false;
if (tmp8) {
flag = stateFromStores2;
}
};