decord/beta/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

39 lines
1.5 KiB
TypeScript

// Module ID: 13063
// Function ID: 13064
// Name: shouldShowVoiceChannelChangeConfirmation
// Dependencies: [4653, 1183, 502, 1979, 4655, 2]
// Exports: shouldShowVoiceChannelChangeConfirmation
// Module 13063 (shouldShowVoiceChannelChangeConfirmation)
import GameConsoleStore from "GameConsoleStore" /* 4653 */;
import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1183 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import GuildStore from "GuildStore" /* 1979 */;
import VoiceStateStore from "VoiceStateStore" /* 4655 */;
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;
}
}
};