decord/source/modules/guild_onboarding/native/GuildOnboardingManager.tsx

103 lines
3.4 KiB
TypeScript
Raw Normal View History

// Module ID: 17525
// Function ID: 17526
// Name: GuildOnboardingManager
// Dependencies: [2022, 1980, 4461, 1074, 4265, 7225, 7202, 1385, 2]
2026-07-20 16:05:17 +00:00
// Module 17525 (GuildOnboardingManager)
import doGuildOnboardingDefault from "doGuildOnboarding" /* 7202 */;
import GuildMemberStore from "GuildMemberStore" /* 2022 */;
import GuildStore from "GuildStore" /* 1980 */;
import SelectedGuildStore from "SelectedGuildStore" /* 4461 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7225 */;
2026-07-23 10:11:24 +00:00
let require = fn;
const GuildFeatures = fn(1074).GuildFeatures;
const GuildMemberFlags = fn(4265).GuildMemberFlags;
let guildId = null;
const channelId = null;
const prototype = function GuildOnboardingManager() {
2026-07-29 08:29:29 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
2026-08-24 06:08:38 +00:00
require = applyArgumentsResult;
2026-07-29 08:29:29 +00:00
applyArgumentsResult.actions = {
CHANNEL_SELECT(arg0) {
return applyArgumentsResult.handleChannelSelect(arg0);
},
GUILD_DELETE(arg0) {
return applyArgumentsResult.handleGuildDelete(arg0);
},
POST_CONNECTION_OPEN() {
return applyArgumentsResult.handleConnectionOpen();
}
};
applyArgumentsResult.handleConnectionOpen = function handleConnectionOpen() {
2026-08-24 06:08:38 +00:00
if (guildId == null) {
guildId = SelectedGuildStore.getGuildId();
2026-07-29 08:29:29 +00:00
}
if (guildId == null) {
guildId = null;
}
if (null != guildId) {
2026-08-24 06:08:38 +00:00
const result = applyArgumentsResult._openOnboardingIfIncomplete(guildId);
2026-07-29 08:29:29 +00:00
}
};
applyArgumentsResult.handleChannelSelect = function handleChannelSelect(arg0) {
({ guildId, channelId } = arg0);
2026-08-24 06:08:38 +00:00
let tmp = guildId === guildId;
2026-07-29 08:29:29 +00:00
if (tmp) {
2026-08-24 06:08:38 +00:00
tmp = channelId === channelId;
2026-07-29 08:29:29 +00:00
}
if (!tmp) {
if (channelId == null) {
channelId = null;
}
if (guildId == null) {
guildId = null;
}
if (null != guildId) {
2026-08-24 06:08:38 +00:00
const result = applyArgumentsResult._openOnboardingIfIncomplete(guildId);
2026-07-29 08:29:29 +00:00
}
}
};
applyArgumentsResult.handleGuildDelete = function handleGuildDelete(guild) {
const result = applyArgumentsResult(7202).discardOnboardingPromise(guild.guild.id);
2026-07-29 08:29:29 +00:00
};
2026-08-24 06:08:38 +00:00
applyArgumentsResult._openOnboardingIfIncomplete = function _openOnboardingIfIncomplete(guildId) {
guild = guild.getGuild(guildId);
2026-07-29 08:29:29 +00:00
if (null != guild) {
const features = guild.features;
if (features.has(constants.GUILD_ONBOARDING)) {
2026-08-24 06:08:38 +00:00
selfMember = selfMember.getSelfMember(guildId);
2026-07-29 08:29:29 +00:00
let hasFlagResult = null != selfMember;
if (hasFlagResult) {
let num = selfMember.flags;
if (num == null) {
num = 0;
}
hasFlagResult = !applyArgumentsResult(1385).hasFlag(num, constants2.COMPLETED_ONBOARDING);
const obj = applyArgumentsResult(1385);
2026-07-29 08:29:29 +00:00
}
if (hasFlagResult) {
let num2 = selfMember.flags;
if (num2 == null) {
num2 = 0;
}
hasFlagResult = applyArgumentsResult(1385).hasFlag(num2, constants2.STARTED_ONBOARDING);
const obj2 = applyArgumentsResult(1385);
2026-07-29 08:29:29 +00:00
}
if (hasFlagResult) {
const obj3 = { guildId };
doGuildOnboardingDefault(obj3);
2026-07-29 08:29:29 +00:00
}
}
}
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
2026-07-20 16:05:17 +00:00
}
const prototype1 = new prototype();
const size = fn(2);
let result = size.fileFinishedImporting("modules/guild_onboarding/native/GuildOnboardingManager.tsx");
2026-07-20 16:05:17 +00:00
export default prototype1;