decord/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx
2026-09-03 10:05:34 +00:00

38 lines
1.4 KiB
TypeScript

// Module ID: 13027
// Function ID: 13028
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4495, 1303, 1215, 1908, 4497, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 13027 (shouldShowVoiceChannelChangeConfirmation)
import closure_0 from "set" /* 4495 */;
import closure_1 from "CHANNEL_SIDEBAR_WIDTH" /* 1303 */;
import closure_2 from "fetchFingerprint" /* 1215 */;
import closure_3 from "createGuildRecordFromRust" /* 1908 */;
import closure_4 from "updateVoiceState" /* 4497 */;
const result = require("set").fileFinishedImporting("modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx");
export const shouldShowVoiceChannelChangeConfirmation = function shouldShowVoiceChannelChangeConfirmation(id) {
if (obj.disableVoiceChannelChangeAlert) {
return false;
} else {
remoteSessionId = remoteSessionId.getRemoteSessionId();
if (null != voiceStateForSession.getVoiceStateForSession(id.getId(), remoteSessionId)) {
return false;
} else if (obj.isCurrentClientInVoiceChannel()) {
if (obj.isInChannel(id.id)) {
return false;
} else {
guild = guild.getGuild(id.getGuildId());
let afkChannelId;
if (guild != null) {
afkChannelId = guild.afkChannelId;
}
return null == afkChannelId || !obj.isInChannel(guild.afkChannelId);
}
} else {
return false;
}
}
};