decord/source/modules/guild_scheduled_events/GuildScheduledEventUtils.tsx

51 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 9040
// Function ID: 9041
2026-07-20 16:05:17 +00:00
// Name: getNextShownUpcomingEventNoticeType
2026-08-07 06:50:47 +00:00
// Dependencies: [1378, 3883, 11, 2]
2026-07-20 16:05:17 +00:00
// Exports: getNextShownUpcomingEventNoticeType
2026-08-08 06:10:11 +00:00
// Module 9040 (getNextShownUpcomingEventNoticeType)
2026-07-23 10:11:24 +00:00
import GUILD_EVENT_MAX_NAME_LENGTH from "GUILD_EVENT_MAX_NAME_LENGTH";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
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);
2026-07-23 10:11:24 +00:00
const result = require("DISCORD_EPOCH").fileFinishedImporting("modules/guild_scheduled_events/GuildScheduledEventUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getNextShownUpcomingEventNoticeType = function getNextShownUpcomingEventNoticeType(guildScheduledEvent, arg1, arg2, flag) {
2026-08-07 06:50:47 +00:00
const obj = importDefault(3883)();
2026-07-20 16:05:17 +00:00
const time = new Date(guildScheduledEvent.scheduled_start_time).getTime();
2026-07-29 08:29:29 +00:00
const diff = time - closure_4;
if (obj.isBetween(diff, time)) {
2026-07-20 16:05:17 +00:00
if (null != arg1) {
2026-08-07 06:50:47 +00:00
const obj4 = tmp(3883)(arg1);
2026-07-29 08:29:29 +00:00
const isBetweenResult = obj4.isBetween(diff, time);
2026-07-20 16:05:17 +00:00
let EVENT_STARTING_SOON;
if (!isBetweenResult) {
2026-07-29 08:29:29 +00:00
if (!obj4.isBetween(obj5.subtract(closure_5, "days"), time)) {
2026-07-20 16:05:17 +00:00
EVENT_STARTING_SOON = constants.EVENT_STARTING_SOON;
}
}
return EVENT_STARTING_SOON;
} else {
return constants.EVENT_STARTING_SOON;
}
} else {
2026-07-29 08:29:29 +00:00
let tmp5 = arg2;
const extractTimestampResult = tmp(11).extractTimestamp(guildScheduledEvent.id);
if (arg2 == null) {
tmp5 = extractTimestampResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (obj.isBetween(extractTimestampResult, Math.min(tmp5 + closure_3, time))) {
2026-07-20 16:05:17 +00:00
if (null == arg1) {
2026-07-29 08:29:29 +00:00
if (!flag) {
2026-07-20 16:05:17 +00:00
return constants.NEW_EVENT;
}
}
}
}
const date = new Date(guildScheduledEvent.scheduled_start_time);
};