decord/alpha/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

39 lines
1.5 KiB
TypeScript

// Module ID: 12696
// Function ID: 12697
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4862, 1184, 502, 2066, 4864, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 12696 (shouldShowVoiceChannelChangeConfirmation)
import GameConsoleStore from "GameConsoleStore" /* 4862 */;
import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1184 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import GuildStore from "GuildStore" /* 2066 */;
import VoiceStateStore from "VoiceStateStore" /* 4864 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx");
export const shouldShowVoiceChannelChangeConfirmation = function shouldShowVoiceChannelChangeConfirmation(id) {
if (UnsyncedUserSettingsStore.disableVoiceChannelChangeAlert) {
return false;
} else {
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
if (null != VoiceStateStore.getVoiceStateForSession(AuthenticationStore.getId(), remoteSessionId)) {
return false;
} else if (obj.isCurrentClientInVoiceChannel()) {
if (obj.isInChannel(id.id)) {
return false;
} else {
const guild = GuildStore.getGuild(id.getGuildId());
let afkChannelId;
if (guild != null) {
afkChannelId = guild.afkChannelId;
}
return null == afkChannelId || !obj.isInChannel(guild.afkChannelId);
}
} else {
return false;
}
}
};