decord/source/modules/guild_scheduled_events/GuildScheduledEventUtils.tsx
2026-08-05 07:35:12 +00:00

50 lines
1.8 KiB
TypeScript

// Module ID: 8934
// Function ID: 8935
// Name: getNextShownUpcomingEventNoticeType
// Dependencies: [1378, 3837, 11, 2]
// Exports: getNextShownUpcomingEventNoticeType
// Module 8934 (getNextShownUpcomingEventNoticeType)
import GUILD_EVENT_MAX_NAME_LENGTH from "GUILD_EVENT_MAX_NAME_LENGTH";
let c3;
let c4;
let c5;
let obj1;
({ UpcomingGuildEventNoticeTypes: obj1, NEW_EVENT_WINDOW_MILLISECONDS: c3, EVENT_STARTING_SOON_WINDOW_MILLISECONDS: c4, ACKED_RECENTLY_WINDOW_DAYS: c5 } = GUILD_EVENT_MAX_NAME_LENGTH);
const result = require("DISCORD_EPOCH").fileFinishedImporting("modules/guild_scheduled_events/GuildScheduledEventUtils.tsx");
export const getNextShownUpcomingEventNoticeType = function getNextShownUpcomingEventNoticeType(guildScheduledEvent, arg1, arg2, flag) {
const obj = importDefault(3837)();
const time = new Date(guildScheduledEvent.scheduled_start_time).getTime();
const diff = time - closure_4;
if (obj.isBetween(diff, time)) {
if (null != arg1) {
const obj4 = tmp(3837)(arg1);
const isBetweenResult = obj4.isBetween(diff, time);
let EVENT_STARTING_SOON;
if (!isBetweenResult) {
if (!obj4.isBetween(obj5.subtract(closure_5, "days"), time)) {
EVENT_STARTING_SOON = constants.EVENT_STARTING_SOON;
}
}
return EVENT_STARTING_SOON;
} else {
return constants.EVENT_STARTING_SOON;
}
} else {
let tmp5 = arg2;
const extractTimestampResult = tmp(11).extractTimestamp(guildScheduledEvent.id);
if (arg2 == null) {
tmp5 = extractTimestampResult;
}
if (obj.isBetween(extractTimestampResult, Math.min(tmp5 + closure_3, time))) {
if (null == arg1) {
if (!flag) {
return constants.NEW_EVENT;
}
}
}
}
const date = new Date(guildScheduledEvent.scheduled_start_time);
};