decord/source/modules/guild_onboarding/native/GuildOnboardingManager.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

102 lines
3.4 KiB
TypeScript

// Module ID: 17455
// Function ID: 17456
// Name: GuildOnboardingManager
// Dependencies: [2021, 1979, 4428, 1074, 4232, 7191, 7168, 1384, 2]
// Module 17455 (GuildOnboardingManager)
import doGuildOnboardingDefault from "doGuildOnboarding" /* 7168 */;
import GuildMemberStore from "GuildMemberStore" /* 2021 */;
import GuildStore from "GuildStore" /* 1979 */;
import SelectedGuildStore from "SelectedGuildStore" /* 4428 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7191 */;
let require = fn;
const GuildFeatures = fn(1074).GuildFeatures;
const GuildMemberFlags = fn(4232).GuildMemberFlags;
let guildId = null;
const channelId = null;
const prototype = function GuildOnboardingManager() {
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
require = applyArgumentsResult;
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() {
if (guildId == null) {
guildId = SelectedGuildStore.getGuildId();
}
if (guildId == null) {
guildId = null;
}
if (null != guildId) {
const result = applyArgumentsResult._openOnboardingIfIncomplete(guildId);
}
};
applyArgumentsResult.handleChannelSelect = function handleChannelSelect(arg0) {
({ guildId, channelId } = arg0);
let tmp = guildId === guildId;
if (tmp) {
tmp = channelId === channelId;
}
if (!tmp) {
if (channelId == null) {
channelId = null;
}
if (guildId == null) {
guildId = null;
}
if (null != guildId) {
const result = applyArgumentsResult._openOnboardingIfIncomplete(guildId);
}
}
};
applyArgumentsResult.handleGuildDelete = function handleGuildDelete(guild) {
const result = applyArgumentsResult(7168).discardOnboardingPromise(guild.guild.id);
};
applyArgumentsResult._openOnboardingIfIncomplete = function _openOnboardingIfIncomplete(guildId) {
guild = guild.getGuild(guildId);
if (null != guild) {
const features = guild.features;
if (features.has(constants.GUILD_ONBOARDING)) {
selfMember = selfMember.getSelfMember(guildId);
let hasFlagResult = null != selfMember;
if (hasFlagResult) {
let num = selfMember.flags;
if (num == null) {
num = 0;
}
hasFlagResult = !applyArgumentsResult(1384).hasFlag(num, constants2.COMPLETED_ONBOARDING);
const obj = applyArgumentsResult(1384);
}
if (hasFlagResult) {
let num2 = selfMember.flags;
if (num2 == null) {
num2 = 0;
}
hasFlagResult = applyArgumentsResult(1384).hasFlag(num2, constants2.STARTED_ONBOARDING);
const obj2 = applyArgumentsResult(1384);
}
if (hasFlagResult) {
const obj3 = { guildId };
doGuildOnboardingDefault(obj3);
}
}
}
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
const prototype1 = new prototype();
const size = fn(2);
let result = size.fileFinishedImporting("modules/guild_onboarding/native/GuildOnboardingManager.tsx");
export default prototype1;