This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,25 @@
// Metro module 5692 (f5693).
import ApplicationRecord from "../../../records/ApplicationRecord";
import { deserialize, has } from "../../../_bundle/HighLow";
const getApplicationFlags = function getApplicationFlags(application) {
let r24;
if (application == null) {
r24 = deserialize(0);
} else if (application != null && (application instanceof ApplicationRecord || "flags" in application && typeof application.flags === "bigint" || "flags" in application && application.flags != null && typeof application.flags === "object" && "parts" in application.flags)) {
r24 = application.flags;
} else {
let flags_new = application.flags_new;
if (flags_new == null) {
flags_new = application.flags;
}
if (flags_new == null) {
flags_new = 0;
}
r24 = deserialize(flags_new);
}
return r24;
};
export { getApplicationFlags };
export function hasApplicationFlag(a0, a1) {
return has(getApplicationFlags(a0), a1);
}
@@ -0,0 +1,30 @@
// Metro module 8030 (f8031).
import ApplicationCommandIndexStore from "../../application_commands/ApplicationCommandIndexStore";
import { BuiltInSectionId } from "../../application_commands/ApplicationCommandConstants";
import { ApplicationIntegrationType } from "../../../_bundle/Module8028";
function $mk79688() {
return (a0) => a0?.oauth2_install_params != null || a0?.oauth2InstallParams != null;
}
export function canInstallApplication({ customInstallUrl, installParams, integrationTypesConfig }) {
return customInstallUrl != null || installParams != null || integrationTypesConfig != null && Object.values(integrationTypesConfig).some($mk79688());
}
export function isAppUserInstallable({ customInstallUrl, installParams, integrationTypesConfig }) {
return (customInstallUrl != null || installParams != null || integrationTypesConfig != null && Object.values(integrationTypesConfig).some($mk79688())) && integrationTypesConfig != null && ApplicationIntegrationType.USER_INSTALL in integrationTypesConfig;
}
export function shouldInstallApplicationOnDemand({ applicationId, channel, commandIntegrationTypes }) {
const r0 = commandIntegrationTypes != null && !commandIntegrationTypes.includes(ApplicationIntegrationType.USER_INSTALL);
let r18 = !r0;
if (!r0) {
let r22 = !(applicationId === BuiltInSectionId.BUILT_IN);
if (r22) {
const hasUserStateApplication = ApplicationCommandIndexStore.hasUserStateApplication(applicationId);
r22 = hasUserStateApplication ? !hasUserStateApplication : channel == null || !ApplicationCommandIndexStore.hasContextStateApplication({
applicationId,
channelId: channel.id,
guildId: channel.guild_id
});
}
r18 = r22;
}
return r18;
}
@@ -0,0 +1,12 @@
// Metro module 8026 (f8027).
import ApplicationStore from "../ApplicationStore";
import AgeRestrictedApplicationCommandsExperiment from "../../application_commands/AgeRestrictedApplicationCommandsExperiment";
import { isAgeRestrictedContentClassification } from "../../content_classification/utils";
export default function isApplicationAgeRestricted(a0) {
if (AgeRestrictedApplicationCommandsExperiment.getConfig({
location: "isApplicationAgeRestricted"
}).enabled) {
return isAgeRestrictedContentClassification(ApplicationStore.getApplication(a0)?.contentClassification);
}
return false;
};