50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
// Module ID: 11978
|
|
// Function ID: 11979
|
|
// Name: _initialize
|
|
// Dependencies: [1862, 676, 4433, 709, 5851, 2]
|
|
|
|
// Module 11978 (_initialize)
|
|
import createGuildRecordFromRust from "createGuildRecordFromRust";
|
|
import { GuildFeatures } from "ME";
|
|
import "initialize";
|
|
|
|
let require = arg1;
|
|
class HubJoinManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
closure_0 = applyArgumentsResult;
|
|
applyArgumentsResult.handleGuildCreate = function handleGuildCreate(guild) {
|
|
guild = outer1_3.getGuild(guild.guild.id);
|
|
let tmp2 = null != guild;
|
|
if (tmp2) {
|
|
const features = guild.features;
|
|
let hasItem;
|
|
if (features != null) {
|
|
hasItem = features.has(outer1_4.HUB);
|
|
}
|
|
tmp2 = hasItem;
|
|
}
|
|
if (tmp2) {
|
|
const onClose = applyArgumentsResult.onClose;
|
|
if (onClose != null) {
|
|
onClose();
|
|
}
|
|
applyArgumentsResult(outer1_2[4]).transitionToGuild(guild.id);
|
|
const obj = applyArgumentsResult(outer1_2[4]);
|
|
}
|
|
};
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = HubJoinManager.prototype;
|
|
prototype["_initialize"] = function _initialize(onClose) {
|
|
this.onClose = onClose;
|
|
const subscription = importDefault(709).subscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
};
|
|
prototype["_terminate"] = function _terminate() {
|
|
importDefault(709).unsubscribe("GUILD_CREATE", this.handleGuildCreate);
|
|
};
|
|
const hubJoinManager = new HubJoinManager();
|
|
const result = require("initialize").fileFinishedImporting("modules/hub/HubJoinManager.tsx");
|
|
|
|
export default hubJoinManager;
|