decord/source/modules/channel/SelectedChannelManager.tsx
2026-08-08 06:10:11 +00:00

72 lines
2.9 KiB
TypeScript

// Module ID: 16560
// Function ID: 16561
// Name: handleGuildCreate
// Dependencies: [4351, 1960, 4124, 676, 5261, 5957, 5129, 1222, 709, 2]
// Module 16560 (handleGuildCreate)
import _detectH265HardwareDecode from "_detectH265HardwareDecode";
import handleConnectionOpen from "handleConnectionOpen";
import { findFirstVoiceChannelId } from "handleConnectionOpen";
import closure_6 from "handleConnectionOpen";
import ME from "ME";
import "initialize";
let c10;
let c9;
let error;
let metroImportAll;
const require = arg1;
({ ChannelTypes: error, Routes: metroImportAll, ME: c9, NULL_STRING_GUILD_ID: c10 } = ME);
class SelectedChannelManager extends tmp3 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { GUILD_CREATE: applyArgumentsResult.handleGuildCreate, CHANNEL_CREATE: applyArgumentsResult.handleChannelCreate, LOGOUT: applyArgumentsResult.handleLogout };
return applyArgumentsResult;
}
}
const prototype = SelectedChannelManager.prototype;
prototype["handleGuildCreate"] = function handleGuildCreate(guild) {
guild = guild.guild;
const channelId = store.getChannelId(closure_9);
const voiceChannelId = store.getVoiceChannelId();
if (guild.id === channelId) {
require(5957) /* transitionToGuild */.transitionToGuild(guild.id);
const obj = require(5957) /* transitionToGuild */;
}
let tmp6 = guild.id === voiceChannelId;
if (tmp6) {
tmp6 = false !== guild.unavailable;
}
if (tmp6) {
tmp6 = null == voiceChannelId;
}
if (tmp6) {
const voiceChannel = importDefault(5129).selectVoiceChannel(findFirstVoiceChannelId(guild.id));
const obj2 = importDefault(5129);
}
};
prototype["handleChannelCreate"] = function handleChannelCreate(channel) {
channel = channel.channel;
if (channel.type === constants.GROUP_DM) {
const originChannelId = channel.originChannelId;
const channelId = store.getChannelId(closure_10);
if (tmp) {
require(1222) /* transitionTo */.transitionTo(closure_8.CHANNEL(closure_9, channel.id));
const obj = require(1222) /* transitionTo */;
}
const obj3 = store;
tmp = null == guildId.getGuildId() && null != originChannelId && originChannelId === channelId;
if (tmp7) {
const voiceChannel = importDefault(5129).selectVoiceChannel(channel.id, videoEnabled.isVideoEnabled());
const obj2 = importDefault(5129);
}
tmp7 = null != originChannelId && originChannelId === store.getVoiceChannelId();
}
};
prototype["handleLogout"] = function handleLogout() {
importDefault(709).dispatch({ type: "VOICE_CHANNEL_SELECT", channelId: null, guildId: null, video: false, currentVoiceChannelId: null, joinVoiceId: null });
};
const selectedChannelManager = new SelectedChannelManager();
const result = require("handleConnectionOpen").fileFinishedImporting("modules/channel/SelectedChannelManager.tsx");
export default selectedChannelManager;