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

38 lines
1.4 KiB
TypeScript

// Module ID: 12943
// Function ID: 12944
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4461, 1304, 1218, 1910, 4463, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 12943 (shouldShowVoiceChannelChangeConfirmation)
import closure_0 from "set" /* 4461 */;
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" /* 4463 */;
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;
}
}
};