decord/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx
2026-08-12 06:57:52 +00:00

38 lines
1.4 KiB
TypeScript

// Module ID: 12730
// Function ID: 12731
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4358, 1304, 1218, 1910, 4360, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 12730 (shouldShowVoiceChannelChangeConfirmation)
import set from "set";
import CHANNEL_SIDEBAR_WIDTH from "CHANNEL_SIDEBAR_WIDTH";
import fetchFingerprint from "fetchFingerprint";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import updateVoiceState from "updateVoiceState";
const result = require("fetchFingerprint").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;
}
}
};