decord/alpha/source/modules/rpc/helpers/getCurrentVoiceChannel.tsx
2026-10-03 08:58:59 +00:00

24 lines
897 B
TypeScript

// Module ID: 6876
// Function ID: 6877
// Name: getCurrentVoiceChannel
// Dependencies: [502, 2051, 4909, 2]
// Exports: default
// Module 6876 (getCurrentVoiceChannel)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import ChannelStore from "ChannelStore" /* 2051 */;
import VoiceStateStore from "VoiceStateStore" /* 4909 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/rpc/helpers/getCurrentVoiceChannel.tsx");
export default function getCurrentVoiceChannel() {
const getVoiceStateForSession = VoiceStateStore.getVoiceStateForSession;
const id = AuthenticationStore.getId();
const voiceStateForSession = getVoiceStateForSession(id, AuthenticationStore.getSessionId());
let channelId;
if (voiceStateForSession != null) {
channelId = voiceStateForSession.channelId;
}
return ChannelStore.getChannel(channelId);
};