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

35 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-09-01 10:26:29 +00:00
// Module ID: 12796
// Function ID: 12797
2026-07-20 16:05:17 +00:00
// Name: maybeOpenSpoilerGateForVoiceChannel
2026-09-01 10:26:29 +00:00
// Dependencies: [1387, 21, 6174, 4859, 12797, 2]
2026-07-20 16:05:17 +00:00
// Exports: maybeOpenSpoilerGateForVoiceChannel
2026-09-01 10:26:29 +00:00
// Module 12796 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4859 */;
import isChannelSpoilerGated from "isChannelSpoilerGated" /* 6174 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 12797 */;
import VoicePanelSpoilerAlertDefault from "VoicePanelSpoilerAlert" /* 12797 */;
2026-08-31 15:47:37 +00:00
import closure_3 from "ensureGuildLoaded" /* 1387 */;
2026-08-24 06:08:38 +00:00
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;
};