decord/beta/source/modules/rpc/helpers/getCurrentVoiceChannel.tsx

24 lines
821 B
TypeScript
Raw Normal View History

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