decord/source/modules/guild_scheduled_events/GuildScheduledEventUtils.tsx

51 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8261
2026-07-27 11:26:19 +00:00
// Function ID: 66383
2026-07-20 16:05:17 +00:00
// Name: getNextShownUpcomingEventNoticeType
2026-07-25 08:10:48 +00:00
// Dependencies: [1354, 3713, 21, 2]
2026-07-20 16:05:17 +00:00
// Exports: getNextShownUpcomingEventNoticeType
2026-07-25 08:10:48 +00:00
// Module 8261 (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-23 10:11:24 +00:00
let closure_2;
let closure_3;
let closure_4;
let closure_5;
({ UpcomingGuildEventNoticeTypes: closure_2, NEW_EVENT_WINDOW_MILLISECONDS: closure_3, EVENT_STARTING_SOON_WINDOW_MILLISECONDS: closure_4, ACKED_RECENTLY_WINDOW_DAYS: closure_5 } = GUILD_EVENT_MAX_NAME_LENGTH);
const result = require("DISCORD_EPOCH").fileFinishedImporting("modules/guild_scheduled_events/GuildScheduledEventUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getNextShownUpcomingEventNoticeType = function getNextShownUpcomingEventNoticeType(guildScheduledEvent, arg1, arg2, arg3) {
2026-07-25 08:10:48 +00:00
let obj = importDefault(3713)();
2026-07-20 16:05:17 +00:00
const time = new Date(guildScheduledEvent.scheduled_start_time).getTime();
obj = { start: time - closure_4, end: time };
if (obj.isBetween(obj.start, obj.end)) {
if (null != arg1) {
2026-07-25 08:10:48 +00:00
const obj5 = importDefault(3713)(arg1);
2026-07-20 16:05:17 +00:00
const isBetweenResult = obj5.isBetween(obj.start, obj.end);
let EVENT_STARTING_SOON;
if (!isBetweenResult) {
if (!obj5.isBetween(obj6.subtract(closure_5, "days"), time)) {
EVENT_STARTING_SOON = constants.EVENT_STARTING_SOON;
}
}
return EVENT_STARTING_SOON;
} else {
return constants.EVENT_STARTING_SOON;
}
} else {
2026-07-23 10:11:24 +00:00
const extractTimestampResult = importDefault(21).extractTimestamp(guildScheduledEvent.id);
2026-07-20 16:05:17 +00:00
let tmp6 = extractTimestampResult;
if (null != arg2) {
tmp6 = arg2;
}
if (obj.isBetween(extractTimestampResult, Math.min(tmp6 + closure_3, time))) {
if (null == arg1) {
if (!arg3) {
return constants.NEW_EVENT;
}
}
}
}
const date = new Date(guildScheduledEvent.scheduled_start_time);
};