decord/source/modules/channel/SelectedChannelManager.tsx

74 lines
3 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 17302
// Function ID: 17303
2026-07-29 08:29:29 +00:00
// Name: handleGuildCreate
2026-09-02 09:53:35 +00:00
// Dependencies: [4529, 1980, 4299, 673, 5494, 6195, 5363, 1219, 706, 2]
2026-07-20 16:05:17 +00:00
2026-09-02 09:53:35 +00:00
// Module 17302 (handleGuildCreate)
import dispatcherDefault from "dispatcher" /* 706 */;
import transitionTo from "transitionTo" /* 1219 */;
import _modDef5363 from "module_5363" /* 5363 */;
import initializeDefault from "initialize" /* 5494 */;
import transitionToGuild from "transitionToGuild" /* 6195 */;
2026-09-01 10:26:29 +00:00
import closure_3 from "_detectH265HardwareDecode" /* 4529 */;
2026-09-02 09:53:35 +00:00
import closure_4 from "handleConnectionOpen" /* 1980 */;
import { findFirstVoiceChannelId } from "handleConnectionOpen" /* 1980 */;
2026-09-01 10:26:29 +00:00
import closure_6 from "handleConnectionOpen" /* 4299 */;
2026-09-02 09:53:35 +00:00
import ME from "ME" /* 673 */;
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-09-02 09:53:35 +00:00
const voiceChannel = _modDef5363.selectVoiceChannel(findFirstVoiceChannelId(guild.id));
const obj2 = _modDef5363;
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-09-02 09:53:35 +00:00
const voiceChannel = _modDef5363.selectVoiceChannel(channel.id, videoEnabled.isVideoEnabled());
const obj2 = _modDef5363;
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;