decord/alpha/source/modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx

41 lines
1.6 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 7495
// Function ID: 7496
2026-07-20 16:05:17 +00:00
// Name: shouldShowVoiceChannelChangeConfirmation
2026-10-10 08:08:14 +00:00
// Dependencies: [5111, 1207, 502, 2087, 5113, 2]
2026-07-20 16:05:17 +00:00
// Exports: shouldShowVoiceChannelChangeConfirmation
2026-10-12 06:59:38 +00:00
// Module 7495 (shouldShowVoiceChannelChangeConfirmation)
2026-10-10 08:08:14 +00:00
import GameConsoleStore from "GameConsoleStore" /* 5111 */;
2026-10-08 09:57:35 +00:00
import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1207 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-10 08:08:14 +00:00
import GuildStore from "GuildStore" /* 2087 */;
import VoiceStateStore from "VoiceStateStore" /* 5113 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const result = size.fileFinishedImporting("modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx");
2026-07-20 16:05:17 +00:00
export const shouldShowVoiceChannelChangeConfirmation = function shouldShowVoiceChannelChangeConfirmation(id) {
if (UnsyncedUserSettingsStore.disableVoiceChannelChangeAlert) {
2026-07-20 16:05:17 +00:00
return false;
} else {
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
if (null != VoiceStateStore.getVoiceStateForSession(AuthenticationStore.getId(), remoteSessionId)) {
2026-07-20 16:05:17 +00:00
return false;
2026-10-03 08:58:59 +00:00
} else if (VoiceStateStore.isCurrentClientInVoiceChannel()) {
if (VoiceStateStore.isInChannel(id.id)) {
2026-07-20 16:05:17 +00:00
return false;
} else {
const guild = GuildStore.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-10-03 08:58:59 +00:00
const tmp9 = null == afkChannelId || !VoiceStateStore.isInChannel(guild.afkChannelId);
return tmp9;
2026-07-20 16:05:17 +00:00
}
} else {
return false;
}
}
};