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

24 lines
821 B
TypeScript
Raw Normal View History

// Module ID: 7387
// Function ID: 7388
2026-07-20 16:05:17 +00:00
// Name: getCurrentVoiceChannel
// Dependencies: [502, 1957, 4593, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 7387 (getCurrentVoiceChannel)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import VoiceStateStore from "VoiceStateStore" /* 4593 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/rpc/helpers/getCurrentVoiceChannel.tsx");
2026-07-20 16:05:17 +00:00
export default function getCurrentVoiceChannel() {
const id = AuthenticationStore.getId();
const voiceStateForSession = VoiceStateStore.getVoiceStateForSession(id, AuthenticationStore.getSessionId());
2026-07-20 16:05:17 +00:00
let channelId;
2026-07-29 08:29:29 +00:00
if (voiceStateForSession != null) {
2026-07-20 16:05:17 +00:00
channelId = voiceStateForSession.channelId;
}
return ChannelStore.getChannel(channelId);
2026-07-20 16:05:17 +00:00
};