decord/alpha/source/modules/guests/GuestUtils.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

42 lines
1.2 KiB
TypeScript

// Module ID: 11062
// Function ID: 11063
// Name: GuestUtils
// Dependencies: [4484, 1385, 8024, 2]
// Module 11062 (GuestUtils)
import FlagUtils from "FlagUtils" /* 1385 */;
import GuildMemberConstants from "GuildMemberConstants" /* 4484 */;
import size from "module_2" /* 2 */;
const GuildMemberFlags = GuildMemberConstants.GuildMemberFlags;
const result = size.fileFinishedImporting("modules/guests/GuestUtils.tsx");
export default {
canAcceptInvite(items, guild) {
[obj] = items;
guild = guild.guild;
let tmp = null == guild;
if (!tmp) {
const selfMember = obj.getSelfMember(guild.id);
let num;
if (selfMember != null) {
num = selfMember.flags;
}
if (num == null) {
num = 0;
}
const hasFlagResult = FlagUtils.hasFlag(num, GuildMemberFlags.IS_GUEST);
let hasFlagResult1 = !hasFlagResult;
if (hasFlagResult) {
let num2 = guild.flags;
if (num2 == null) {
num2 = 0;
}
hasFlagResult1 = tmp2(1385).hasFlag(num2, tmp2(8024).GuildInviteFlags.IS_GUEST_INVITE);
const tmp2Result = tmp2(1385);
}
tmp = hasFlagResult1;
}
return tmp;
}
};