decord/source/modules/messages/MessageUtils.tsx
2026-07-25 08:10:48 +00:00

35 lines
1.2 KiB
TypeScript

// Module ID: 10186
// Function ID: 78811
// Name: canViewPotentiallyNSFWChannel
// Dependencies: [1348, 1850, 4346, 2]
// Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage
// Module 10186 (canViewPotentiallyNSFWChannel)
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_3 from "_isNativeReflectConstruct";
const require = arg1;
const result = require("shouldAgeVerifyForAgeGate").fileFinishedImporting("modules/messages/MessageUtils.tsx");
export const canViewPotentiallyNSFWChannel = function canViewPotentiallyNSFWChannel(channel_id) {
currentUser = currentUser.getCurrentUser();
const channel = store.getChannel(channel_id);
let tmp3 = null != currentUser && null != channel;
if (tmp3) {
tmp3 = !require(4346) /* shouldAgeVerifyForAgeGate */.isChannelContentGated(channel);
const obj = require(4346) /* shouldAgeVerifyForAgeGate */;
}
return tmp3;
};
export const getGuildIdFromMessage = function getGuildIdFromMessage(channel_id) {
const channel = store.getChannel(channel_id.channel_id);
let guild_id;
if (null != channel) {
guild_id = channel.guild_id;
}
let tmp3;
if (null != guild_id) {
tmp3 = guild_id;
}
return tmp3;
};