import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./config-not-found-B9AOp828.mjs";import{n as r,o as i}from"./discord-api-CMcqid5c.mjs";const a={path:`/quests`,categories:[`social-media`],example:`/discord/quests`,features:{requireConfig:[{name:`DISCORD_AUTHORIZATION`,description:`Discord authorization header`}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`discord.com/quest-home`]}],name:`Quests`,maintainers:[`TonyRL`],handler:o};async function o(){let{authorization:a}=e.discord||{};if(!a)throw new n(`Discord RSS is disabled due to the lack of authorization config`);let o=(await i(a)).quests.map(e=>{let n=Object.values(e.config.task_config.tasks).map(e=>e.event_name);return{title:`${e.config.messages.quest_name} - Claim ${e.config.rewards_config.rewards[0].messages.name}`,description:n.join(`, `),author:e.config.messages.game_publisher,pubDate:t(e.config.starts_at),category:n,link:e.config.application.link.split(`?`)[0],guid:e.id}});return{title:`Available Quests - Discord`,link:`${r}/quest-home`,item:o}}export{a as route};