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

103 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16680
// Function ID: 16681
2026-07-29 08:29:29 +00:00
// Name: prototype
2026-08-24 06:08:38 +00:00
// Dependencies: [1991, 1910, 4201, 676, 4012, 5043, 6820, 1403, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 16680 (prototype)
import initializeDefault from "initialize" /* 5043 */;
import closure_3 from "trackCommunicationDisabled" /* 1991 */;
import closure_4 from "createGuildRecordFromRust" /* 1910 */;
import closure_5 from "handleConnectionOpen" /* 4201 */;
import { GuildFeatures } from "ME" /* 676 */;
import { GuildMemberFlags } from "GuildMemberFlags" /* 4012 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let require = arg1;
let c8 = null;
let c9 = null;
2026-08-24 06:08:38 +00:00
initializeDefault;
2026-07-29 08:29:29 +00:00
let prototype = function GuildOnboardingManager() {
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 = closure_1_5.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) {
2026-08-24 06:08:38 +00:00
const result = applyArgumentsResult(6820).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) {
2026-08-11 06:20:06 +00:00
let obj = applyArgumentsResult(1403);
2026-07-29 08:29:29 +00:00
let num = selfMember.flags;
if (num == null) {
num = 0;
}
hasFlagResult = !obj.hasFlag(num, constants2.COMPLETED_ONBOARDING);
}
if (hasFlagResult) {
let num2 = selfMember.flags;
if (num2 == null) {
num2 = 0;
}
2026-08-11 06:20:06 +00:00
hasFlagResult = applyArgumentsResult(1403).hasFlag(num2, constants2.STARTED_ONBOARDING);
const obj2 = applyArgumentsResult(1403);
2026-07-29 08:29:29 +00:00
}
if (hasFlagResult) {
obj = { guildId: null };
2026-08-24 06:08:38 +00:00
obj[0] = guildId;
callback(6820)(obj);
2026-07-29 08:29:29 +00:00
}
}
}
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
prototype = new prototype();
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/guild_onboarding/native/GuildOnboardingManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;