2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 12507
|
|
|
|
|
// Function ID: 12508
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: HubJoinManager
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [2087, 1085, 2002, 584, 7053, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 12507 (HubJoinManager)
|
2026-10-07 22:43:51 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 584 */;
|
|
|
|
|
import Constants from "Constants" /* 1085 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import transitionToGuild from "transitionToGuild" /* 7053 */;
|
|
|
|
|
import GuildStore from "GuildStore" /* 2087 */;
|
|
|
|
|
import LifecycleManager from "LifecycleManager" /* 2002 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
const GuildFeatures = Constants.GuildFeatures;
|
|
|
|
|
class HubJoinManager extends LifecycleManager {
|
2026-09-18 19:45:33 +00:00
|
|
|
constructor() {
|
2026-10-01 14:13:23 +00:00
|
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(this, new.target);
|
|
|
|
|
require = applyArgumentsResult;
|
2026-09-18 19:45:33 +00:00
|
|
|
applyArgumentsResult.handleGuildCreate = function handleGuildCreate(guild) {
|
|
|
|
|
guild = GuildStore.getGuild(guild.guild.id);
|
|
|
|
|
let tmp2 = null != guild;
|
|
|
|
|
if (tmp2) {
|
|
|
|
|
const features = guild.features;
|
|
|
|
|
let hasItem;
|
|
|
|
|
if (features != null) {
|
|
|
|
|
hasItem = features.has(GuildFeatures.HUB);
|
|
|
|
|
}
|
|
|
|
|
tmp2 = hasItem;
|
|
|
|
|
}
|
|
|
|
|
if (tmp2) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const onClose = require.onClose;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (onClose != null) {
|
|
|
|
|
onClose();
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = transitionToGuild;
|
|
|
|
|
obj.transitionToGuild(guild.id);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return applyArgumentsResult;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
_initialize(onClose) {
|
|
|
|
|
this.onClose = onClose;
|
|
|
|
|
const obj = DispatcherDefault;
|
|
|
|
|
const subscription = obj.subscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
|
|
|
}
|
|
|
|
|
_terminate() {
|
|
|
|
|
const obj = DispatcherDefault;
|
|
|
|
|
obj.unsubscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
const prototype = HubJoinManager.prototype;
|
|
|
|
|
const hubJoinManager = new HubJoinManager();
|
|
|
|
|
const result = size.fileFinishedImporting("modules/hub/HubJoinManager.tsx");
|
|
|
|
|
|
|
|
|
|
export default hubJoinManager;
|