decord/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx

39 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12882
// Function ID: 12883
2026-07-20 16:05:17 +00:00
// Name: shouldShowVoiceChannelChangeConfirmation
2026-08-24 06:08:38 +00:00
// Dependencies: [4545, 1304, 1218, 1910, 4547, 2]
2026-07-20 16:05:17 +00:00
// Exports: shouldShowVoiceChannelChangeConfirmation
2026-08-24 06:08:38 +00:00
// 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 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx");
2026-07-20 16:05:17 +00:00
export const shouldShowVoiceChannelChangeConfirmation = function shouldShowVoiceChannelChangeConfirmation(id) {
if (obj.disableVoiceChannelChangeAlert) {
return false;
} else {
2026-07-23 10:11:24 +00:00
remoteSessionId = remoteSessionId.getRemoteSessionId();
2026-07-29 08:29:29 +00:00
if (null != voiceStateForSession.getVoiceStateForSession(id.getId(), remoteSessionId)) {
2026-07-20 16:05:17 +00:00
return false;
2026-07-29 08:29:29 +00:00
} else if (obj.isCurrentClientInVoiceChannel()) {
if (obj.isInChannel(id.id)) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-07-23 10:11:24 +00:00
guild = guild.getGuild(id.getGuildId());
2026-07-20 16:05:17 +00:00
let afkChannelId;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
afkChannelId = guild.afkChannelId;
}
2026-07-29 08:29:29 +00:00
return null == afkChannelId || !obj.isInChannel(guild.afkChannelId);
2026-07-20 16:05:17 +00:00
}
} else {
return false;
}
}
};