INNER CODE UNIT · JavaScript
selectTaskConfig
nyxxbit/discord-quest-completer · index.js:288
const selectTaskConfig = (config) => {
const current = config?.taskConfigV2;
if (taskKeys(current?.tasks).length > 0) return current;
const legacy = config?.taskConfig;
if (taskKeys(legacy?.tasks).length > 0) return legacy;
return current ?? legacy ?? null;
};
// Task keys Discord validates somewhere this script cannot reach, mapped to why.
// ACHIEVEMENT_IN_GAME is not ACHIEVEMENT_IN_ACTIVITY: no embedded activity, no discordsays
// backend to report progress to, so the bypass has nothing to authorize against. The quest
// wants an achievement inside the retail game with the game linked to the account.
const UNAUTOMATABLE_KEYS = new Map([
['ACHIEVEMENT_IN_GAME', 'That needs the game linked to your account and an achievement earned inside the game itself, which nothing running in Discord can do for you.']
]);
/*
* Why this client cannot drive a quest, as the sentence to log, or null when it can drive it.