decord/source/modules/calls/toggleVoiceChannelChat.tsx
2026-08-05 07:35:12 +00:00

40 lines
1.2 KiB
TypeScript

// Module ID: 13655
// Function ID: 13656
// Name: toggleVoiceChannelChat
// Dependencies: [1372, 4326, 4268, 4448, 2]
// Exports: toggleVoiceChannelChat
// Module 13655 (toggleVoiceChannelChat)
import ensureGuildLoaded from "ensureGuildLoaded";
import createRTCConnection from "createRTCConnection";
import getParticipants from "getParticipants";
const result = require("getParticipants").fileFinishedImporting("modules/calls/toggleVoiceChannelChat.tsx");
export const toggleVoiceChannelChat = function toggleVoiceChannelChat(open) {
let obj = connected;
if (connected.isConnected()) {
const channelId = obj.getChannelId();
if (null == channelId) {
return null;
} else {
channel = channel.getChannel(channelId);
if (null != channel) {
if (channel.isGuildVoice()) {
let tmp3 = open;
if (open == null) {
tmp3 = !chatOpen.getChatOpen(channelId);
}
importDefault(4448).updateChatOpen(channelId, tmp3);
obj = { channelId: null, chatOpen: null };
obj[0] = channelId;
obj[1] = tmp3;
return obj;
}
}
return null;
}
} else {
return null;
}
};