Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
// Module ID: 11603
|
|
// Function ID: 11604
|
|
// Name: GuestUtils
|
|
// Dependencies: [4414, 1385, 8695, 2]
|
|
|
|
// Module 11603 (GuestUtils)
|
|
import FlagUtils from "FlagUtils" /* 1385 */;
|
|
import GuildMemberConstants from "GuildMemberConstants" /* 4414 */;
|
|
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(8695).GuildInviteFlags.IS_GUEST_INVITE);
|
|
const tmp2Result = tmp2(1385);
|
|
}
|
|
tmp = hasFlagResult1;
|
|
}
|
|
return tmp;
|
|
}
|
|
};
|