decord/source/modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

34 lines
1.3 KiB
TypeScript

// Module ID: 12936
// Function ID: 12937
// Name: maybeOpenSpoilerGateForVoiceChannel
// Dependencies: [1957, 21, 7329, 4906, 12937, 2]
// Exports: maybeOpenSpoilerGateForVoiceChannel
// Module 12936 (maybeOpenSpoilerGateForVoiceChannel)
import useAlertStore from "useAlertStore" /* 4906 */;
import isChannelSpoilerGated from "isChannelSpoilerGated" /* 7329 */;
import VoicePanelSpoilerAlert from "VoicePanelSpoilerAlert" /* 12937 */;
import VoicePanelSpoilerAlertDefault from "VoicePanelSpoilerAlert" /* 12937 */;
import closure_3 from "ensureGuildLoaded" /* 1957 */;
import { jsx } from "jsxProd" /* 21 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx");
export const maybeOpenSpoilerGateForVoiceChannel = function maybeOpenSpoilerGateForVoiceChannel(id) {
channel = channel.getChannel(id);
let tmp2 = null == channel;
if (!tmp2) {
let obj = isChannelSpoilerGated;
tmp2 = !obj.shouldShowSpoilerGateForChannelId(id);
}
let flag = !tmp2;
if (!tmp2) {
obj = { channelId: null };
obj[0] = channel.id;
useAlertStore.openAlert(VoicePanelSpoilerAlert.VOICE_PANEL_SPOILER_KEY, jsx(VoicePanelSpoilerAlertDefault, { channelId: null }));
flag = true;
const obj2 = useAlertStore;
}
return flag;
};