Discord Quests Bot is a self-hosted Discord bot that drives your account's quests to 100% for you. Run /quests, 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.
The 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.
- 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.
- 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=falsein.envto use the in-channel progress bar instead. - Full quest coverage - video quests (watch trailers) and game quests (desktop, Xbox, PlayStation, streaming, play activity) are all automated.
- Production-grade API client - per-route rate limiting, 429 backoff, transient-failure retries, request timeouts, and typed errors.
- Resilient automation - stall detection abandons quests that stop progressing instead of hanging the batch; one failing quest never blocks the rest.
- 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.
- Bun v1.1+
- A Discord application with a bot token (create one in the developer portal)
The Windows setup script in scripts/user installs Node.js, Bun, and the project dependencies for you, so you can skip the manual Bun install.
- Download the repository as a ZIP and extract it, or clone it with Git.
- Open the
scripts\userfolder and double-clickinstall.bat. It checks for Node.js and Bun, installs whichever is missing, installs the project dependencies, and creates your.envfile. - Open
.envin Notepad and paste your bot token afterDISCORD_TOKEN=. - Double-click
run.batto start the bot. Keep its window open while the bot is running.
Note
The setup script uses winget to install Node.js. If winget is unavailable, install Node.js from nodejs.org and run install.bat again.
git clone https://github.com/DevonNetwork/Discord-Quests-Bot.git
cd Discord-Quests-Bot
bun installThe Windows setup script creates .env for you. Otherwise, copy the example
environment file and fill in your bot token:
cp .env.example .env| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
โ | Bot token from the Discord developer portal |
GUILD_ID |
โ | Register commands in one guild for instant availability during development; leave empty for global registration |
Feature toggles are read from .env; their defaults live in src/config.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 /dashboard command when set to true. Accepted values are true or false.
Quest 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.
The public dashboard language is controlled by dashboardLanguage in src/config.ts. It defaults to 'ar' (Arabic); set it to 'en' for English.
bun run dev # development, with file watching
bun run start # production
bun run check # typecheck + lint + tests
bun run check:build-number # verify Discord's live client build numberThe individual quality commands are bun run typecheck, bun run lint, and
bun test.
Build the image and run the container with your .env file:
docker build -t discord-quests-bot .
docker run -d --name discord-quests-bot --restart unless-stopped --env-file .env discord-quests-botFollow the logs with docker logs -f discord-quests-bot, stop the bot with
docker stop discord-quests-bot, and start it again with
docker start discord-quests-bot. The image contains only the runtime
dependencies, and your .env file stays on the host.
The bot also listens on port 8080 and answers every request with a short
health message, which satisfies hosts that expect a web service URL.
- Run
/questsin any server the bot is in. - Paste your Discord user token into the modal.
- The bot shows your quests privately, one at a time, with the game art, reward, expiry, and progress.
- 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.
- 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.
- Claim your rewards in the Discord client and enjoy.
Set DASHBOARD_ENABLED=true in .env and restart the bot to register the /dashboard 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.
The 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.
Note
The /dashboard command requires the Administrator permission, but the button in the posted embed is available to everyone who can see the channel.
Note
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.
Discord 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:
flowchart LR
A["GET /users/@me\nvalidate token"] --> B["GET /quests/@me\nlist active quests"]
B --> C["POST /quests/{id}/enroll\nopt in if needed"]
C --> D{Quest type?}
D -- video --> E["POST /quests/{id}/video-progress\nevery 5s"]
D -- game --> F["POST /quests/{id}/heartbeat\nevery 30s"]
E --> G["100% complete"]
F --> G
G --> H["terminal heartbeat\ngame quests only"]
- Video quests (
WATCH_VIDEO,WATCH_VIDEO_ON_MOBILE) report a timestamp that advances with the wall clock. - 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. - Game sessions end with a
terminal: trueheartbeat, matching what the real client sends when a game closes.
Quests with tasks outside this list are displayed in the quest list but skipped by the automation.
src/
โโโ api/ REST client for user-token requests
โ โโโ build-number.ts runtime client build number resolver
โ โโโ client.ts rate limiting, retries, timeouts
โ โโโ errors.ts typed API errors
โ โโโ fingerprint.ts desktop client headers / x-super-properties
โ โโโ token.ts token shape checks and validation
โโโ bot/ Discord bot layer (discord.js)
โ โโโ commands.ts slash command registration
โ โโโ embeds.ts embed builders for the quest UI
โ โโโ flow.ts interaction handling and run orchestration
โ โโโ registry.ts per-user setup and run state
โโโ quest/ Quest engine - no discord.js dependency
โ โโโ complete.ts batch orchestration with hooks
โ โโโ executables.ts game executable resolution
โ โโโ quest.ts quest model and progress queries
โ โโโ runner.ts heartbeat / video-progress loop
โ โโโ tasks.ts supported task registry and pacing
โโโ util/ Small shared helpers
โโโ config.ts environment configuration and feature toggles
โโโ index.ts entry point
tests/
โโโ api/ mirrors src/api
โโโ bot/ mirrors src/bot
โโโ quest/ mirrors src/quest
โโโ testing/ shared test infrastructure (scripted API client)
โโโ util/ mirrors src/util
โโโ config.test.ts
scripts/
โโโ check-build-number.ts
โโโ user/ Windows setup and run helpers
Tests live in tests/ at the repository root and mirror the source layout, so
src/ stays focused on runtime code. Run them with bun test.
Where do I find my Discord user token?
Open the Discord client, press Ctrl+Shift+I to open developer tools, go to the Network tab, and copy the authorization header value from any request to discord.com.
Is my token safe?
The 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.
Why is a quest skipped?
Only 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.
What happens if a quest gets stuck?
A 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.
Contributions are welcome! Please open an issue to discuss bigger changes before submitting a pull request.
bun install
bun run check # typecheck + lint + testsSee CONTRIBUTING.md for the full workflow, code expectations, and test setup. Security issues should be reported privately as described in SECURITY.md.
Automating a user account violates the Discord Terms of Service 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.
Distributed under the Apache-2.0 license.