decord/alpha/source/modules/guild_verification/GuildVerificationManager.tsx

64 lines
2.1 KiB
TypeScript
Raw Normal View History

// Module ID: 17112
// Function ID: 17113
// Name: GuildVerificationManager
// Dependencies: [1074, 12472, 1385, 7832, 12473, 6534, 2]
2026-07-20 16:05:17 +00:00
// Module 17112 (GuildVerificationManager)
import Constants from "Constants" /* 1074 */;
import FlagUtils from "FlagUtils" /* 1385 */;
import GuildInviteFlags from "GuildInviteFlags" /* 7832 */;
import HubUtilsDefault from "HubUtils" /* 12472 */;
import GuildVerificationUtils from "GuildVerificationUtils" /* 12473 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6534 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function handleInviteData(invite) {
const guild = invite.invite.guild;
2026-07-29 08:29:29 +00:00
let num = invite.invite.flags;
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
if (null != guild) {
2026-07-29 08:29:29 +00:00
let hasItem;
if (guild != null) {
2026-07-20 16:05:17 +00:00
const features = guild.features;
2026-07-29 08:29:29 +00:00
if (features != null) {
hasItem = features.includes(GuildFeatures.HUB);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
if (hasItem) {
HubUtilsDefault.onOpenHubInvite(invite.invite);
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
let new_member = invite.invite.new_member;
if (new_member) {
let hasFlagResult = FlagUtils.hasFlag(num, GuildInviteFlags.GuildInviteFlags.IS_GUEST_INVITE);
2026-07-20 16:05:17 +00:00
if (!hasFlagResult) {
hasFlagResult = tmp3(1385).hasFlag(num, tmp3(7832).GuildInviteFlags.IS_APPLICATION_BYPASS);
const tmp3Result = tmp3(1385);
2026-07-20 16:05:17 +00:00
}
new_member = !hasFlagResult;
}
if (new_member) {
new_member = null != guild;
}
if (new_member) {
new_member = GuildVerificationUtils.inviteGuildHasPendingMemberDisabledVerification(guild);
2026-07-20 16:05:17 +00:00
}
if (new_member) {
const result = GuildVerificationUtils.openVerificationModalOrTransitionToApplication(guild.id);
2026-07-20 16:05:17 +00:00
}
}
const GuildFeatures = Constants.GuildFeatures;
const prototype = function GuildVerificationManager() {
2026-07-29 08:29:29 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = { INVITE_ACCEPT_SUCCESS: handleInviteData };
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
const prototype1 = new prototype();
let result = size.fileFinishedImporting("modules/guild_verification/GuildVerificationManager.tsx");
2026-07-20 16:05:17 +00:00
export default prototype1;