decord/source/modules/spoiler_channels/maybeOpenSpoilerGateForVoiceChannel.native.tsx
2026-07-31 08:44:05 +00:00

30 lines
1.1 KiB
TypeScript

// Module ID: 12442
// Function ID: 12443
// Name: maybeOpenSpoilerGateForVoiceChannel
// Dependencies: [1372, 21, 7732, 4534, 12443, 2]
// Exports: maybeOpenSpoilerGateForVoiceChannel
// Module 12442 (maybeOpenSpoilerGateForVoiceChannel)
import ensureGuildLoaded from "ensureGuildLoaded";
import { jsx } from "jsxProd";
const require = arg1;
const result = require("isChannelSpoilerGated").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 = require(7732) /* isChannelSpoilerGated */;
tmp2 = !obj.shouldShowSpoilerGateForChannelId(id);
}
let flag = !tmp2;
if (!tmp2) {
obj = { channelId: null };
obj[0] = channel.id;
require(4534) /* useAlertStore */.openAlert(require(12443) /* VoicePanelSpoilerAlert */.VOICE_PANEL_SPOILER_KEY, jsx(importDefault(12443), { channelId: null }));
flag = true;
const obj2 = require(4534) /* useAlertStore */;
}
return flag;
};