[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116211":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":12,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":21,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},116211,"Discord-Quests-Bot","DevonNetwork\u002FDiscord-Quests-Bot","DevonNetwork","A discord bot that automatically completes all user's quests on Discord. Made for educational purposes only.","https:\u002F\u002Fdiscord.gg\u002Fdevon",null,"TypeScript",51,9,0,43,"Apache License 2.0",false,"main",true,[],"2026-10-31 11:11:41","2026-11-18 04:40:47","\u003Cdiv align=\"center\">\n\n# Discord Quests Bot\n\n**Complete your Discord quests automatically - one click, every reward.**\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0-blue.svg)](LICENSE)\n[![CI](https:\u002F\u002Fgithub.com\u002FDevonNetwork\u002FDiscord-Quests-Bot\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FDevonNetwork\u002FDiscord-Quests-Bot\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Runtime](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime-Bun-f472b6?logo=bun&logoColor=white)](https:\u002F\u002Fbun.sh)\n[![Language](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-TypeScript-3178c6?logo=typescript&logoColor=white)](https:\u002F\u002Fwww.typescriptlang.org)\n[![Built with](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbuilt%20with-discord.js-5865f2?logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.js.org)\n\n\u003C\u002Fdiv>\n\nDiscord Quests Bot is a self-hosted Discord bot that drives your account's quests to 100% for you. Run `\u002Fquests`, follow the private prompt, and pick a single quest or sweep every active one - the bot reports progress in your DMs and stops cleanly whenever you tell it to.\n\nThe quest engine lives in its own module with **zero discord.js dependency**, so you can run the bot as-is or embed the engine in your own projects.\n\n---\n\n## ✨ Features\n\n- **Quest browser** - page through every active quest with **Back** and **Next**, see its art, reward, and progress, then press **Confirm** to run it. Completed quests stay out of the way until you press **Show completed**. **Complete all quests** sweeps the rest.\n- **Private quest runs** - every interaction reply is ephemeral, and the bot DMs you as each quest finishes with a summary when the run ends. Set `DM_QUEST_UPDATES=false` in `.env` to use the in-channel progress bar instead.\n- **Full quest coverage** - video quests (watch trailers) and game quests (desktop, Xbox, PlayStation, streaming, play activity) are all automated.\n- **Production-grade API client** - per-route rate limiting, 429 backoff, transient-failure retries, request timeouts, and typed errors.\n- **Resilient automation** - stall detection abandons quests that stop progressing instead of hanging the batch; one failing quest never blocks the rest.\n- **Private by design** - tokens are validated, held in memory for the session, and dropped when the run ends. Nothing is stored, logged, or sent anywhere but discord.com.\n\n## 🚀 Getting started\n\n### Prerequisites\n\n- [Bun](https:\u002F\u002Fbun.sh) **v1.1+**\n- A Discord application with a bot token (create one in the [developer portal](https:\u002F\u002Fdiscord.com\u002Fdevelopers\u002Fapplications))\n\nThe Windows setup script in `scripts\u002Fuser` installs Node.js, Bun, and the project dependencies for you, so you can skip the manual Bun install.\n\n### Installation\n\n#### Windows\n\n1. [Download the repository as a ZIP](https:\u002F\u002Fgithub.com\u002FDevonNetwork\u002FDiscord-Quests-Bot\u002Farchive\u002Frefs\u002Fheads\u002Fmain.zip) and extract it, or clone it with Git.\n2. Open the `scripts\\user` folder and double-click **`install.bat`**. It checks for Node.js and Bun, installs whichever is missing, installs the project dependencies, and creates your `.env` file.\n3. Open `.env` in Notepad and paste your bot token after `DISCORD_TOKEN=`.\n4. Double-click **`run.bat`** to start the bot. Keep its window open while the bot is running.\n\n> [!NOTE]\n> The setup script uses `winget` to install Node.js. If `winget` is unavailable, install Node.js from [nodejs.org](https:\u002F\u002Fnodejs.org) and run `install.bat` again.\n\n#### macOS and Linux\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FDevonNetwork\u002FDiscord-Quests-Bot.git\ncd Discord-Quests-Bot\nbun install\n```\n\n### Configuration\n\nThe Windows setup script creates `.env` for you. Otherwise, copy the example\nenvironment file and fill in your bot token:\n\n```sh\ncp .env.example .env\n```\n\n| Variable    | Required | Description                                                                                          |\n| ----------- | :------: | ---------------------------------------------------------------------------------------------------- |\n| `DISCORD_TOKEN` | ✅ | Bot token from the Discord developer portal                                                          |\n| `GUILD_ID`  | ❌ | Register commands in one guild for instant availability during development; leave empty for global registration |\n\nFeature toggles are read from `.env`; their defaults live in `src\u002Fconfig.ts`. `DM_QUEST_UPDATES` is enabled by default and sends quest completion updates by DM; set it to `false` to use the in-channel progress embed instead. `DASHBOARD_ENABLED` is disabled by default and registers the admin-only `\u002Fdashboard` command when set to `true`. Accepted values are `true` or `false`.\n\nQuest activity logging is controlled by `LOGGING_MODE`. When enabled, `LOG_CONSOLE_ENABLED`, `LOG_WEBHOOK_ENABLED` with `LOG_WEBHOOK_URL`, and `LOG_CHANNEL_ENABLED` with `LOG_CHANNEL_ID` select the destinations independently. Secrets are redacted before anything is sent.\n\nThe public dashboard language is controlled by `dashboardLanguage` in `src\u002Fconfig.ts`. It defaults to `'ar'` (Arabic); set it to `'en'` for English.\n\n### Running\n\n```sh\nbun run dev                 # development, with file watching\nbun run start               # production\nbun run check               # typecheck + lint + tests\nbun run check:build-number  # verify Discord's live client build number\n```\n\nThe individual quality commands are `bun run typecheck`, `bun run lint`, and\n`bun test`.\n\n### Docker\n\nBuild the image and run the container with your `.env` file:\n\n```sh\ndocker build -t discord-quests-bot .\ndocker run -d --name discord-quests-bot --restart unless-stopped --env-file .env discord-quests-bot\n```\n\nFollow the logs with `docker logs -f discord-quests-bot`, stop the bot with\n`docker stop discord-quests-bot`, and start it again with\n`docker start discord-quests-bot`. The image contains only the runtime\ndependencies, and your `.env` file stays on the host.\n\nThe bot also listens on port `8080` and answers every request with a short\nhealth message, which satisfies hosts that expect a web service URL.\n\n## 🤖 Usage\n\n1. Run **`\u002Fquests`** in any server the bot is in.\n2. Paste your **Discord user token** into the modal.\n3. The bot shows your quests privately, one at a time, with the game art, reward, expiry, and progress.\n4. Use **Back** and **Next** to browse, then press **Confirm** to complete the quest you picked, or **Complete all quests** to run every supported one. Finished quests are hidden by default; press **Show completed** to browse them at the end of the list.\n5. The bot DMs you as each quest finishes and sends a summary when the run ends. Press **Stop** from the start message or the DM whenever you like. If your DMs are closed, the bot falls back to a private progress embed.\n6. Claim your rewards in the Discord client and enjoy.\n\n### Dashboard\n\nSet `DASHBOARD_ENABLED=true` in `.env` and restart the bot to register the `\u002Fdashboard` command. An administrator can run it in a channel to post a persistent embed with a **Get Started** button. Anyone in that channel can press the button, follow the private prompt, and use the same quest browser without running a slash command. Every reply in that flow is private, and quest completion updates arrive by DM.\n\nThe embed is posted in Arabic by default. The **English version** button opens the same embed in English for that user, and the **النسخة العربية** button switches back. Set `dashboardLanguage` to `'en'` to make English the default instead.\n\n> [!NOTE]\n> The `\u002Fdashboard` command requires the **Administrator** permission, but the button in the posted embed is available to everyone who can see the channel.\n\n> [!NOTE]\n> Rewards are not claimed automatically. When a quest hits 100%, open the Discord client and claim it from your quest page like you normally would.\n\n## ⚙️ How it works\n\nDiscord tracks quest progress server-side through undocumented endpoints normally driven by the desktop client. Given a user token, the engine speaks to those endpoints directly:\n\n```mermaid\nflowchart LR\n    A[\"GET \u002Fusers\u002F@me\\nvalidate token\"] --> B[\"GET \u002Fquests\u002F@me\\nlist active quests\"]\n    B --> C[\"POST \u002Fquests\u002F{id}\u002Fenroll\\nopt in if needed\"]\n    C --> D{Quest type?}\n    D -- video --> E[\"POST \u002Fquests\u002F{id}\u002Fvideo-progress\\nevery 5s\"]\n    D -- game --> F[\"POST \u002Fquests\u002F{id}\u002Fheartbeat\\nevery 30s\"]\n    E --> G[\"100% complete\"]\n    F --> G\n    G --> H[\"terminal heartbeat\\ngame quests only\"]\n```\n\n- **Video quests** (`WATCH_VIDEO`, `WATCH_VIDEO_ON_MOBILE`) report a timestamp that advances with the wall clock.\n- **Game quests** (`PLAY_ON_DESKTOP`, `PLAY_ON_XBOX`, `PLAY_ON_PLAYSTATION`, `STREAM_ON_DESKTOP`, `PLAY_ACTIVITY`) report an application ID and executable path, resolved from Discord's public application directory and cached per game.\n- **Game sessions end** with a `terminal: true` heartbeat, matching what the real client sends when a game closes.\n\nQuests with tasks outside this list are displayed in the quest list but skipped by the automation.\n\n## 📁 Project structure\n\n```\nsrc\u002F\n├── api\u002F            REST client for user-token requests\n│   ├── build-number.ts runtime client build number resolver\n│   ├── client.ts       rate limiting, retries, timeouts\n│   ├── errors.ts       typed API errors\n│   ├── fingerprint.ts  desktop client headers \u002F x-super-properties\n│   └── token.ts        token shape checks and validation\n├── bot\u002F            Discord bot layer (discord.js)\n│   ├── commands.ts     slash command registration\n│   ├── embeds.ts       embed builders for the quest UI\n│   ├── flow.ts         interaction handling and run orchestration\n│   └── registry.ts     per-user setup and run state\n├── quest\u002F          Quest engine - no discord.js dependency\n│   ├── complete.ts     batch orchestration with hooks\n│   ├── executables.ts  game executable resolution\n│   ├── quest.ts        quest model and progress queries\n│   ├── runner.ts       heartbeat \u002F video-progress loop\n│   └── tasks.ts        supported task registry and pacing\n├── util\u002F           Small shared helpers\n├── config.ts       environment configuration and feature toggles\n└── index.ts        entry point\n\ntests\u002F\n├── api\u002F            mirrors src\u002Fapi\n├── bot\u002F            mirrors src\u002Fbot\n├── quest\u002F          mirrors src\u002Fquest\n├── testing\u002F        shared test infrastructure (scripted API client)\n├── util\u002F           mirrors src\u002Futil\n└── config.test.ts\n\nscripts\u002F\n├── check-build-number.ts\n└── user\u002F           Windows setup and run helpers\n```\n\nTests live in `tests\u002F` at the repository root and mirror the source layout, so\n`src\u002F` stays focused on runtime code. Run them with `bun test`.\n\n## ❓ FAQ\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Where do I find my Discord user token?\u003C\u002Fb>\u003C\u002Fsummary>\n\nOpen the Discord client, press \u003Ckbd>Ctrl\u003C\u002Fkbd>+\u003Ckbd>Shift\u003C\u002Fkbd>+\u003Ckbd>I\u003C\u002Fkbd> to open developer tools, go to the \u003Cb>Network\u003C\u002Fb> tab, and copy the \u003Ccode>authorization\u003C\u002Fcode> header value from any request to discord.com.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Is my token safe?\u003C\u002Fb>\u003C\u002Fsummary>\n\nThe token is validated against the API, kept in memory only for the duration of your session, and dropped as soon as the run ends. It is never persisted to disk, never logged, and never sent anywhere other than discord.com. The bot needs no database and stores no state.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Why is a quest skipped?\u003C\u002Fb>\u003C\u002Fsummary>\n\nOnly the task types listed above can be automated. Quests that require purchases, in-client clicks, or other unsupported actions are shown in the list but excluded from the batch.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>What happens if a quest gets stuck?\u003C\u002Fb>\u003C\u002Fsummary>\n\nA game quest that reports no progress for 8 minutes is considered stalled, abandoned, and logged in the summary - the rest of the batch keeps running. Repeated API failures fail the individual quest the same way.\n\u003C\u002Fdetails>\n\n## 🤝 Contributing\n\nContributions are welcome! Please open an issue to discuss bigger changes before submitting a pull request.\n\n```sh\nbun install\nbun run check   # typecheck + lint + tests\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow, code expectations, and test setup. Security issues should be reported privately as described in [SECURITY.md](SECURITY.md).\n\n## ⚠️ Disclaimer\n\nAutomating a user account violates the [Discord Terms of Service](https:\u002F\u002Fdiscord.com\u002Fterms) and can lead to the account being suspended. This project exists for educational purposes - use it at your own risk, ideally on an account you can afford to lose.\n\n## 📄 License\n\nDistributed under the [Apache-2.0](LICENSE) license.\n","这是一个专为 Discord 用户设计的自动化任务完成机器人，可自动执行各类官方 Quest（任务）并领取奖励。核心功能包括分页浏览任务、一键批量完成、私密进度通知（默认通过 DM）、对视频\u002F游戏类任务的全场景支持，以及具备速率限制处理、失败重试和卡死检测的健壮自动化引擎。项目采用 TypeScript 编写，基于 discord.js 构建，但任务逻辑模块完全解耦、无框架依赖，支持嵌入自定义项目。适用于希望高效完成 Discord 官方活动任务、提升社区参与效率或学习自动化交互实现的个人开发者与教育场景。",2,"2026-11-24 04:53:11","CREATED_QUERY"]