50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
// Module ID: 5052
|
|
// Function ID: 5053
|
|
// Name: hasPendingMemberAction
|
|
// Dependencies: [1391, 1991, 1910, 5053, 5054, 676, 4012, 5055, 1403, 2]
|
|
// Exports: hasPendingMemberAction
|
|
|
|
// Module 5052 (hasPendingMemberAction)
|
|
import hasFlagAll from "hasFlag" /* 1403 */;
|
|
import guildHasOnboardingHomeDefault from "guildHasOnboardingHome" /* 5055 */;
|
|
import closure_3 from "ensureGuildLoaded" /* 1391 */;
|
|
import closure_4 from "trackCommunicationDisabled" /* 1991 */;
|
|
import closure_5 from "createGuildRecordFromRust" /* 1910 */;
|
|
import closure_6 from "handleSettingsLoadSuccess" /* 5053 */;
|
|
import closure_7 from "set" /* 5054 */;
|
|
import { GuildFeatures } from "ME" /* 676 */;
|
|
import { GuildMemberFlags } from "GuildMemberFlags" /* 4012 */;
|
|
|
|
const result = require("set").fileFinishedImporting("modules/guild_onboarding_home/hasPendingMemberAction.tsx");
|
|
|
|
export const hasPendingMemberAction = function hasPendingMemberAction(guild_id, selectedChannelId) {
|
|
guild = guild.getGuild(guild_id);
|
|
channel = channel.getChannel(selectedChannelId);
|
|
let hasItem = null != guild && null != channel;
|
|
if (hasItem) {
|
|
hasItem = guildHasOnboardingHomeDefault(guild);
|
|
}
|
|
if (hasItem) {
|
|
const features = guild.features;
|
|
hasItem = features.has(GuildFeatures.GUILD_SERVER_GUIDE);
|
|
}
|
|
if (hasItem) {
|
|
selfMember = selfMember.getSelfMember(guild.id);
|
|
let num;
|
|
if (selfMember != null) {
|
|
num = selfMember.flags;
|
|
}
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
hasItem = !hasFlagAll.hasFlag(num, GuildMemberFlags.COMPLETED_HOME_ACTIONS);
|
|
const obj = hasFlagAll;
|
|
}
|
|
if (hasItem) {
|
|
hasItem = closure_6.hasMemberAction(guild.id, channel.id);
|
|
}
|
|
if (hasItem) {
|
|
hasItem = !closure_7.hasCompletedActionForChannel(guild.id, channel.id);
|
|
}
|
|
return hasItem;
|
|
};
|