decord/source/modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx

35 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12884
// Function ID: 12885
2026-07-20 16:05:17 +00:00
// Name: maybeOpenSpoilerGateForVoiceChannel
2026-08-24 06:08:38 +00:00
// Dependencies: [1391, 21, 5272, 4663, 12885, 2]
2026-07-20 16:05:17 +00:00
// Exports: maybeOpenSpoilerGateForVoiceChannel
2026-08-24 06:08:38 +00:00
// Module 12884 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4663 */;
import isChannelSpoilerGated from "isChannelSpoilerGated" /* 5272 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 12885 */;
import VoicePanelSpoilerAlertDefault from "VoicePanelSpoilerAlert" /* 12885 */;
import closure_3 from "ensureGuildLoaded" /* 1391 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx");
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export const maybeOpenSpoilerGateForVoiceChannel = function maybeOpenSpoilerGateForVoiceChannel(id) {
channel = channel.getChannel(id);
2026-07-20 16:05:17 +00:00
let tmp2 = null == channel;
if (!tmp2) {
2026-08-24 06:08:38 +00:00
let obj = isChannelSpoilerGated;
2026-07-29 08:29:29 +00:00
tmp2 = !obj.shouldShowSpoilerGateForChannelId(id);
2026-07-20 16:05:17 +00:00
}
let flag = !tmp2;
if (!tmp2) {
2026-07-29 08:29:29 +00:00
obj = { channelId: null };
obj[0] = channel.id;
2026-08-24 06:08:38 +00:00
useAlertStore.openAlert(VoicePanelSpoilerAlert.VOICE_PANEL_SPOILER_KEY, jsx(VoicePanelSpoilerAlertDefault, { channelId: null }));
2026-07-20 16:05:17 +00:00
flag = true;
2026-08-24 06:08:38 +00:00
const obj2 = useAlertStore;
2026-07-20 16:05:17 +00:00
}
return flag;
};