40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
// Module ID: 13568
|
|
// Function ID: 13569
|
|
// Name: toggleVoiceChannelChat
|
|
// Dependencies: [1372, 4261, 4202, 4383, 2]
|
|
// Exports: toggleVoiceChannelChat
|
|
|
|
// Module 13568 (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(4383).updateChatOpen(channelId, tmp3);
|
|
obj = { channelId: null, chatOpen: null };
|
|
obj[0] = channelId;
|
|
obj[1] = tmp3;
|
|
return obj;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
} else {
|
|
return null;
|
|
}
|
|
};
|