// Module ID: 16142 // Function ID: 16143 // Name: disconnect // Dependencies: [1371, 1372, 4205, 4262, 5713, 1236, 5001, 5134, 4074, 2] // Module 16142 (disconnect) import participantFromServer from "participantFromServer"; import ensureGuildLoaded from "ensureGuildLoaded"; import updateVoiceState from "updateVoiceState"; import getVoiceStatesForGuild from "getVoiceStatesForGuild"; import "initialize"; let require = arg1; function disconnect() { currentClientVoiceChannelId = currentClientVoiceChannelId.getCurrentClientVoiceChannelId(null); let flag = false; if (null != currentClientVoiceChannelId) { channel = channel.getChannel(currentClientVoiceChannelId); const tmp3 = null == channel || !channel.isPrivate(); let tmp4 = !tmp3; if (!tmp3) { let tmp5 = channel.recipients.length <= 1; if (tmp5) { let tmp7 = getVoiceStatesForGuild.countVoiceStatesForChannel(currentClientVoiceChannelId) <= 1; if (tmp7) { tmp7 = null == selfEmbeddedActivityForChannel.getSelfEmbeddedActivityForChannel(currentClientVoiceChannelId); } tmp5 = tmp7; } tmp4 = tmp5; } flag = tmp4; } if (flag) { const currentClientVoiceChannelId1 = currentClientVoiceChannelId.getCurrentClientVoiceChannelId(null); if (null != currentClientVoiceChannelId1) { const intl = require(1236) /* getSystemLocale */.intl; importDefault(5713).sendBotMessage(currentClientVoiceChannelId1, intl.formatToPlainString(require(1236) /* getSystemLocale */.t.XYof5G, { number: 3 })); const obj3 = importDefault(5713); const voiceChannel = importDefault(5001).selectVoiceChannel(null); const obj4 = importDefault(5001); } } } let c7 = 180000; let prototype = function CallIdleManager() { const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target); const require = applyArgumentsResult; const timeout = new require(4074) /* start */.Timeout(); applyArgumentsResult.idleTimeout = timeout; applyArgumentsResult.handleConnectionClosed = function handleConnectionClosed() { const idleTimeout = applyArgumentsResult.idleTimeout; idleTimeout.stop(); }; applyArgumentsResult.handleEmbeddedActivityDisconnect = function handleEmbeddedActivityDisconnect() { const currentClientVoiceChannelId = outer1_5.getCurrentClientVoiceChannelId(null); let flag = false; if (null != currentClientVoiceChannelId) { const channel = outer1_4.getChannel(currentClientVoiceChannelId); const tmp3 = null == channel || !channel.isPrivate(); let tmp4 = !tmp3; if (!tmp3) { let tmp5 = channel.recipients.length <= 1; if (tmp5) { let tmp7 = outer1_6.countVoiceStatesForChannel(currentClientVoiceChannelId) <= 1; if (tmp7) { tmp7 = null == outer1_3.getSelfEmbeddedActivityForChannel(currentClientVoiceChannelId); } tmp5 = tmp7; } tmp4 = tmp5; } flag = tmp4; } if (flag) { const idleTimeout = applyArgumentsResult.idleTimeout; idleTimeout.start(outer1_7, outer1_8, true); } }; applyArgumentsResult.handleVoiceStateUpdates = function handleVoiceStateUpdates() { const currentClientVoiceChannelId = outer1_5.getCurrentClientVoiceChannelId(null); let flag = false; if (null != currentClientVoiceChannelId) { const channel = outer1_4.getChannel(currentClientVoiceChannelId); const tmp3 = null == channel || !channel.isPrivate(); let tmp4 = !tmp3; if (!tmp3) { let tmp5 = channel.recipients.length <= 1; if (tmp5) { let tmp7 = outer1_6.countVoiceStatesForChannel(currentClientVoiceChannelId) <= 1; if (tmp7) { tmp7 = null == outer1_3.getSelfEmbeddedActivityForChannel(currentClientVoiceChannelId); } tmp5 = tmp7; } tmp4 = tmp5; } flag = tmp4; } const idleTimeout = applyArgumentsResult.idleTimeout; if (flag) { idleTimeout.start(outer1_7, outer1_8, false); } else { idleTimeout.stop(); } }; applyArgumentsResult.actions = { VOICE_STATE_UPDATES: applyArgumentsResult.handleVoiceStateUpdates, CONNECTION_CLOSED: applyArgumentsResult.handleConnectionClosed, EMBEDDED_ACTIVITY_CLOSE: applyArgumentsResult.handleEmbeddedActivityDisconnect }; return applyArgumentsResult; }.prototype; class prototype extends tmp2 { } prototype = new prototype(); const result = require("updateVoiceState").fileFinishedImporting("modules/voice_calls/CallIdleManager.tsx"); export default prototype;