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

25 lines
897 B
TypeScript
Raw Normal View History

2026-10-02 13:37:24 +00:00
// Module ID: 6792
// Function ID: 6793
// Name: getCurrentVoiceChannel
2026-10-02 13:37:24 +00:00
// Dependencies: [502, 2051, 4856, 2]
// Exports: default
2026-10-02 13:37:24 +00:00
// Module 6792 (getCurrentVoiceChannel)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-02 13:37:24 +00:00
import ChannelStore from "ChannelStore" /* 2051 */;
import VoiceStateStore from "VoiceStateStore" /* 4856 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/rpc/helpers/getCurrentVoiceChannel.tsx");
export default function getCurrentVoiceChannel() {
2026-10-01 14:13:23 +00:00
const getVoiceStateForSession = VoiceStateStore.getVoiceStateForSession;
const id = AuthenticationStore.getId();
2026-10-01 14:13:23 +00:00
const voiceStateForSession = getVoiceStateForSession(id, AuthenticationStore.getSessionId());
let channelId;
if (voiceStateForSession != null) {
channelId = voiceStateForSession.channelId;
}
return ChannelStore.getChannel(channelId);
};