INNER CODE UNIT · JavaScript
questAccessSuspendedUntil
nyxxbit/discord-quest-completer · index.js:392
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.
const buildStreamKey = () => {
try {
const ownerId = Mods.UserStore?.getCurrentUser?.()?.id;
if (!ownerId) return null;