INNER CODE UNIT · JavaScript
enrollmentBlockedUntil
nyxxbit/discord-quest-completer · index.js:387
const enrollmentBlockedUntil = () => futureDate(Mods.QuestStore?.questEnrollmentBlockedUntil);
// Discord returns this beside questEnrollmentBlockedUntil on the quest list fetch and its own
// client refuses to start any unfinished quest while it is set. Enrollment being blocked stops
// new quests; access being suspended stops everything.
const questAccessSuspendedUntil = () => {
const store = Mods.QuestStore;
if (!store) return null;
const explicit = futureDate(store.questAccessSuspendedUntil);
if (explicit) return explicit;
return store.isQuestAccessSuspended === true ? new Date(0) : null;
};
// Discord joins stream key parts with a colon and the trailing component is the stream
// owner: `call:<channelId>:<ownerId>` for a DM, `guild:<guildId>:<channelId>:<ownerId>`
// for a guild voice channel, and its decoder reads them back in that order. This used to
// build `call:<channelId>:<rnd(1000,9999)>`, which put a four digit number where a user
// snowflake belongs and used the DM prefix even for a guild channel.