decord/source/modules/channel/SelectedChannelManager.tsx

74 lines
3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16796
// Function ID: 16797
2026-07-29 08:29:29 +00:00
// Name: handleGuildCreate
2026-08-24 06:08:38 +00:00
// Dependencies: [4501, 1980, 4201, 676, 5043, 7340, 4980, 1222, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 16796 (handleGuildCreate)
import dispatcherDefault from "dispatcher" /* 709 */;
import transitionTo from "transitionTo" /* 1222 */;
import _modDef4980 from "module_4980" /* 4980 */;
import initializeDefault from "initialize" /* 5043 */;
import transitionToGuild from "transitionToGuild" /* 7340 */;
import closure_3 from "_detectH265HardwareDecode" /* 4501 */;
import closure_4 from "handleConnectionOpen" /* 1980 */;
import { findFirstVoiceChannelId } from "handleConnectionOpen" /* 1980 */;
import closure_6 from "handleConnectionOpen" /* 4201 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
({ ChannelTypes: error, Routes: closure_8, ME: c9, NULL_STRING_GUILD_ID: c10 } = ME);
initializeDefault;
2026-07-29 08:29:29 +00:00
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;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
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) {
2026-08-24 06:08:38 +00:00
transitionToGuild.transitionToGuild(guild.id);
const obj = transitionToGuild;
2026-07-29 08:29:29 +00:00
}
let tmp6 = guild.id === voiceChannelId;
if (tmp6) {
tmp6 = false !== guild.unavailable;
}
if (tmp6) {
tmp6 = null == voiceChannelId;
}
if (tmp6) {
2026-08-24 06:08:38 +00:00
const voiceChannel = _modDef4980.selectVoiceChannel(findFirstVoiceChannelId(guild.id));
const obj2 = _modDef4980;
2026-07-29 08:29:29 +00:00
}
};
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) {
2026-08-24 06:08:38 +00:00
transitionTo.transitionTo(closure_8.CHANNEL(closure_9, channel.id));
const obj = transitionTo;
2026-07-29 08:29:29 +00:00
}
const obj3 = store;
tmp = null == guildId.getGuildId() && null != originChannelId && originChannelId === channelId;
if (tmp7) {
2026-08-24 06:08:38 +00:00
const voiceChannel = _modDef4980.selectVoiceChannel(channel.id, videoEnabled.isVideoEnabled());
const obj2 = _modDef4980;
2026-07-29 08:29:29 +00:00
}
tmp7 = null != originChannelId && originChannelId === store.getVoiceChannelId();
}
};
prototype["handleLogout"] = function handleLogout() {
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch({ type: "VOICE_CHANNEL_SELECT", channelId: null, guildId: null, video: false, currentVoiceChannelId: null, joinVoiceId: null });
2026-07-29 08:29:29 +00:00
};
const selectedChannelManager = new SelectedChannelManager();
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/channel/SelectedChannelManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default selectedChannelManager;