decord/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx
2026-08-24 06:08:38 +00:00

38 lines
1.4 KiB
TypeScript

// Module ID: 12882
// Function ID: 12883
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4545, 1304, 1218, 1910, 4547, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 12882 (shouldShowVoiceChannelChangeConfirmation)
import closure_0 from "set" /* 4545 */;
import closure_1 from "CHANNEL_SIDEBAR_WIDTH" /* 1304 */;
import closure_2 from "fetchFingerprint" /* 1218 */;
import closure_3 from "createGuildRecordFromRust" /* 1910 */;
import closure_4 from "updateVoiceState" /* 4547 */;
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;
}
}
};