Scripts for Discord, served from the script library. Browse, read, and copy the source there. All scripts have a console/ version to paste into DevTools, a powershell/ runner for Windows, and a shared native macos/ runner.
| Script | What it does |
|---|---|
autoquest |
Processes supported Discord Quests in a queue with confirmed progress, Pause, and Stop |
token |
Prints your account token |
timestamp |
Overlay that builds Discord <t:…> timestamp codes and copies them |
media |
Fetches images and videos in the background with progress and Stop, then saves one ZIP |
whoami |
Prints your account and a server/DM/friend inventory (read-only) |
export |
Saves the open DM/channel as a self-contained, Discord-looking HTML file |
snowflake |
Decodes an ID or message link into its creation time and a Discord timestamp |
search |
Searches current-channel messages with keywords or RegExp; exports TXT/JSON |
Discord Game Time & Game Variety Badge (badge-gametime) |
Rotates desktop game activity every 23–38 minutes; restores game detection on Stop |
Badge (badge) |
Game time, variety, stream hours (instant spoof or natural rotation) plus HypeSquad join/leave, one panel |
snowflake uses the timestamp bits and epoch documented in Discord's Snowflake reference.
For drafting and formatting messages without running code inside Discord, use the standalone message helper.
Overlay panels use compact custom controls and a distinct icon for each script. Drag the header to move a panel, or focus the header and use the arrow keys (Shift moves faster). Panels open in available space and come to the front when clicked or focused. Close stops that panel's work and releases its UI listeners; other panels stay open. AutoQuest also supports dragging its monitor icon and has a close/stop button in the monitor.
UI browser checks use tests/ui.browser.js with a Playwright page and a static server at http://127.0.0.1:8791 serving this repository. The fixture mocks Discord and tests all eight overlays together, custom controls, movement, closing/cancellation, narrow windows, and all ten consent dialogs without accessing an account.
Every script runs in Discord's DevTools console, in the desktop app or on discord.com.
Each script asks Yes/No before its first run: "Use this script at your own risk. You are responsible for any consequences, including issues affecting your account or data." No, an empty answer, or dismissing the dialog cancels execution. Yes remembers that script's approval. Menus, browsing, and copying do not require approval; choosing Run from a menu does.
Terminal runners ask before fetching or injecting the script and before restarting Discord. Approvals are stored per OS user in %LOCALAPPDATA%/Riyo Scripts/consent on Windows or ~/Library/Application Support/Riyo Scripts/consent on macOS. Console scripts use a styled Yes/No dialog and remember approvals in Discord's local storage. Desktop injection carries the terminal approval into the console script, so it does not ask twice. Deleting the corresponding approval file or clearing Discord's local storage restores the warning in that environment. If saving the choice fails, the next run asks again.
-
Copy the script. The console form of every script is at
/d/c/<name>. Openhttps://script.riyo.me/d/c/autoquestin any browser, pressCtrl+A, thenCtrl+C. Or copy it from a terminal:irm https://script.riyo.me/d/c/autoquest | scb # Windows (PowerShell)
curl -sL https://script.riyo.me/d/c/autoquest | pbcopy # macOS
-
In Discord, press
Ctrl+Shift+I(Cmd+Opt+Ion macOS) and open the Console tab. -
Paste and press Enter. If the console asks, type
allow pastingfirst.
A one-line loader such as fetch("https://script.riyo.me/d/c/autoquest") does not work in Discord's console. Discord's Content Security Policy blocks requests to hosts outside its allowlist, so the full script has to be pasted.
Every script has a one-line runner using the shared powershell/run.ps1 injector. It runs the script in the Discord desktop client over the Chrome DevTools Protocol — PowerShell does the fetching, so Discord's CSP does not block loading the source. Network requests made by the injected script still follow the client's CSP.
All terminal runners share client selection. If several Discord clients are running, pick the intended client by number; the list shows Stable, PTB, Canary, or Development and its PID. One running client is selected automatically. With no running clients, select an installed client to launch. If the selected client has multiple Discord windows, choose the window as well. Blank input cancels without injecting.
To select a client explicitly, every Windows runner accepts -Client with stable, ptb, canary, development, an exact client name, or a PID. For example:
& ([scriptblock]::Create((irm https://script.riyo.me/d/p/search))) -Client canary
& ([scriptblock]::Create((irm https://script.riyo.me/d/p/badge-gametime))) -Client 12345The injector checks which process owns the debug port. It reuses the selected client's existing port or restarts only that client with a separate port. Windows relaunches preserve the selected process's profile arguments, including --user-data-dir. A different client already listening on port 9222 is not used as a substitute. Run pwsh -NoProfile -File tests/powershell-clients.test.ps1 for the offline routing checks.
irm https://script.riyo.me/p/menu | iex # interactive picker (category, then browse / copy / run)
irm https://script.riyo.me/d/p/autoquest | iex # run autoquest
irm https://script.riyo.me/d/p/token | iex # copy your token to the clipboard
irm https://script.riyo.me/d/p/timestamp | iex # open the timestamp panel
irm https://script.riyo.me/d/p/media | iex # open the media downloader
irm https://script.riyo.me/d/p/whoami | iex # print account and server inventory here
irm https://script.riyo.me/d/p/export | iex # open the channel export panel
irm https://script.riyo.me/d/p/snowflake | iex # enter an ID here and copy its timestamp
irm https://script.riyo.me/d/p/search | iex # open the channel message finderKeep the https:// — without it, Windows PowerShell 5.1 fails on the HTTP-to-HTTPS redirect. From Command Prompt, wrap it: powershell -c "irm https://script.riyo.me/d/p/autoquest | iex".
No additional installation is required on macOS 10.15 or later. The runner uses the built-in shell, curl, and JavaScript for Automation (osascript):
curl -fsSL https://script.riyo.me/m/menu | sh
curl -fsSL https://script.riyo.me/d/m/autoquest | shReplace autoquest with any script name from the table. All eight scripts use the shared native injector. The menu supports running a script, copying its source, or copying its terminal command. The library includes macOS command copy buttons. Tokens go directly to the clipboard without being printed; whoami returns JSON in Terminal, and snowflake reads an ID from Terminal and copies its timestamp.
The macOS runner finds Stable, PTB, Canary or Development in /Applications or ~/Applications and offers the same numbered client and window choices. Every named runner and the menu accept --client with a client name, alias, or PID:
curl -fsSL https://script.riyo.me/d/m/search | sh -s -- --client canary
curl -fsSL https://script.riyo.me/m/menu | sh -s -- --client 12345It verifies port ownership using lsof, reuses only the selected client's endpoint, and otherwise quits and relaunches only the selected app with a separate debug port. Startup has one 60-second budget; time spent choosing a client or window is excluded. If launch fails, it asks macOS to reopen the selected app normally. Multiple instances of the same macOS app bundle, or instances with custom profile arguments, must already have their own debug ports; automatic relaunch is refused rather than switching profiles. Log in to Discord before running a script.
The injector uses Apple's URLSession WebSocket API. Its callbacks run on the session's main delegate queue. No browser window, UI automation, or Accessibility permission is needed. Source fetching happens outside Discord's CSP.
macOS launch, networking, and clipboard behavior have not been verified on a physical Mac. An offline logic check is available with node tests/macos.test.cjs; it does not launch Discord or access an account. It cannot validate Apple's runtime bridge.
Offline runner check: powershell -File tests/powershell.test.ps1. This checks registration, syntax, and terminal input/output without launching Discord.
On Windows, clients launched by the runner stay independent of the PowerShell console: closing the terminal leaves Discord running, and Discord logs are not attached to that terminal. The runner sets Electron's ELECTRON_NO_ATTACH_CONSOLE only in the launched process environment, including the updater path. Check with powershell -File tests/powershell-detach.test.ps1: it closes a real test console and checks that a harmless child continues running, without launching Discord.
The PowerShell runner waits for the debug port, main window, and renderer while the selected Discord process is running, with one shared 60-second startup limit. Network and socket timeouts are capped by the remaining time. It prints a status message every 15 checks; press Ctrl+C to cancel. If Discord exits, the wait ends with an error. A newly launched updater gets 30 initial checks to spawn the app, within the same limit. Slow-start checks: pwsh -NoProfile -File tests/powershell-wait.test.ps1 (also supports Windows PowerShell).
An existing --remote-debugging-port is awaited without restarting the client. PowerShell supports IPv4 and IPv6 loopback endpoints, bypasses proxies for local debugging, and follows a new main PID or app version after a relaunch only within the selected installation and profile. Injection waits for the mounted app and signed-in user store. Regression checks: powershell -File tests/powershell-clients.test.ps1, powershell -File tests/powershell-debug.test.ps1, and node tests/renderer-ready.test.cjs. These simulate relaunches and use real local sockets; they do not restart Discord.
When Windows does not list the debug listener, the runner verifies the selected process ID through the browser's read-only SystemInfo.getProcessInfo endpoint before connecting to any renderer. A command-line flag alone does not prove that debugging is active. Another client's process ID or an unverifiable endpoint is rejected; the last connection or identity error is included if startup times out.
The runner reuses the selected client's debugging endpoint when available; otherwise it quits that client (interrupting its calls), relaunches it with a free --remote-debugging-port, and runs the script in the selected window. The debug port stays open until that client is restarted normally; while it is open, local programs can run code in that client, so close it when you are done. Requires a Discord build that honours --remote-debugging-port. Console scripts pasted directly into DevTools run in the client whose console you opened.
DevTools is disabled in the desktop app by default. To enable it, add this line to %APPDATA%\discord\settings.json (macOS: ~/Library/Application Support/discord/settings.json), then restart Discord:
"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": trueSupported task types:
WATCH_VIDEO,WATCH_VIDEO_ON_MOBILEPLAY_ON_DESKTOP: uses the desktop client's game store when available; otherwise sends application heartbeats. Server eligibility still applies. Nothing is installed.STREAM_ON_DESKTOP: desktop app only. You must be streaming any window in a voice channel.PLAY_ON_XBOX,PLAY_ON_PLAYSTATIONPLAY_ACTIVITYACHIEVEMENT_IN_ACTIVITY
An icon appears in the top-right corner of the window:
- Hover over it to show the queue. Click it to pin the panel open.
- Drag the icon to move it.
- Drag a waiting quest to change its order in the queue.
- Pause holds the queue and restores any game/stream patches until resumed.
- Stop cancels waiting immediately, restores this run's patches, and prevents further progress requests. An already-sent internal Discord request cannot be recalled.
- Running the script again stops the previous run first. Reload Discord once if an older version is already running.
The queue refreshes Discord's quest list, skips previews and inactive quests, and uses separate enrollment locations for video on mobile and desktop tasks. Completion is shown only after Discord confirms it; otherwise the result is Pending confirmation. Claim rewards manually in Discord.
Rate limits respect Discord's retry delay, with at most three retries. Game/activity tasks fail after three minutes without progress (time spent paused is excluded). CAPTCHA requirements are shown for manual resolution. Activity achievements depend on Discord's authorization and browser CSP/CORS permissions; failed or stopped runs remove newly created authorizations when possible, preserving existing grants.
The protocol and state handling were compared with the local discord-quest-auto-complete-bot project. Its account runner, token handling, and CAPTCHA providers are not part of this script.
Run the offline regression check with node tests/autoquest.test.cjs. It uses a simulated Discord client and makes no account or network requests.
Choose Download all, Images, or Videos to fetch the media in the background. The panel displays file progress and received bytes. Stop, closing the panel, or running the script again aborts the active request and stops the queue. When fetching finishes, click Save ZIP to save all successful files in one archive. Nothing is saved automatically and no tabs are opened for failed requests.
Set Channel to a channel ID, channel/message link, or <#channel ID> mention. Leave it blank to use the current channel. The downloader scans message history for image/video attachments and embeds, without opening the target channel. Max messages defaults to 1,000; use 0 for all history. Stop also cancels history scanning. Only channels accessible to your account can be read.
Blocked or unavailable URLs are skipped and counted in the result. The ZIP is held in memory until saved; batches are limited to 512 MiB. Choose a smaller batch if you reach the limit.
Archive entries retain filenames from response headers or URLs, with a numeric prefix to avoid collisions. Missing or mismatched media extensions are corrected using the response type or common file signatures. Unidentified files without an extension use .bin.
Set Channel to a channel ID, channel/message link, or <#channel ID> mention, then press Find. Leave it blank to use the current channel. The target does not need to be open. Literal keyword matching ignores case; RegExp uses a case-sensitive regular expression. All messages scans history in pages of 100. Disable it to fetch the latest 1–100 messages, or set Limit to 0 to search that channel's local cache (which may be empty if it has never been opened). The target channel is fixed for each run.
Cancel, closing the panel, and rerunning the script stop further requests and remove drag listeners. Rate limits respect the retry delay, with at most three retries. The panel displays up to 200 matches; exports include all matches scanned before completion or cancellation. TXT exports unique URLs, falling back to message text when none exist. JSON exports message IDs, timestamps, authors, and content. Searches only read channels accessible to your account.
Loads Discord's public detectable-game catalog, then uses the desktop client's RunningGameStore and activity dispatcher to show one selected game at a time. Start activates the first game and keeps running, switching every 23–38 minutes. The candidate pool defaults to 250 games; the last 100 selections are excluded where the pool size permits. Existing real games remain in the game store.
Session limit (hours) defaults to 1,000 and caps actual session runtime. It does not instantly add those hours to a badge. The optional ±3% timing wobble defaults to enabled and stays within the 23–38 minute range. The panel shows the active game, next switch time, and different games shown. The former dry-run batch/delay controls are replaced by the rotation schedule.
Stop, closing the panel, rerunning the script, or leaving the page cancels the timer and restores the patched methods. Advanced console controls remain available as window.__multiGamePresence.next() and .stop(). Badge progress is controlled by Discord and is not confirmed by a successful local activity dispatch. Run the offline checks with node --test tests/badge-gametime.test.cjs; they use a fake store and clock and do not access an account.
One panel for four badges. The top table shows what each mode can earn. Instant posts fabricated /science events (game heartbeats with any duration, stream sessions via voice_disconnect) in minutes — backdated timestamps, no fingerprint. Natural is the badge-gametime rotation (game time + variety together, real telemetry, desktop app only, real elapsed time). HypeSquad calls the real membership API: pick a house (1 Bravery, 2 Brilliance, 3 Balance), Join adds the badge, Leave removes it. Badge progress is controlled by Discord (1–2 day cycle) and is not confirmed by a 204. Run the offline checks with node --test tests/badge.test.cjs; they mock fetch/DOM and do not access an account.
Prints your account token as the console result.
Warning
Your token gives full access to your account. Never share it, and never paste a script someone else sent you into the console.
Automating Discord with a user account breaks Discord's Terms of Service. Use these scripts at your own risk.
Scripts share the black glass theme and inline SVG icons in ui/theme.js, and first-run confirmation in ui/consent.js. After editing either, run node scripts/sync-ui.cjs to embed the updated assets in every console script from scripts.json. Each published console script remains standalone and loads no UI assets from external hosts. Use node scripts/sync-ui.cjs --check to detect stale copies. Snowflake uses the panel in DevTools and retains terminal input/output in desktop runners. The offline consent check is node tests/consent.test.cjs.
Search and Media also embed ui/channels.js, sharing channel input parsing, module lookup, cancellable request waits, and bounded rate-limit retries. Sync after editing this file too.
For client compatibility work, consult Discord Client Internals (private repository). Its offline index.html documents store/HTTP lookup fingerprints with captured build numbers and hashes. Run its collector on the affected build before changing module selectors; a lookup snapshot alone is not an end-to-end script test.
Vercel rewrites proxy this repo's main branch: /d/c/<name> serves console/<name>.js, /d/p/<name> serves powershell/<name>.ps1, and /p/menu serves the PowerShell picker. /d/m/<name> serves macos/<name>.sh; these wrappers call the shared loader at /d/m/run. /m/menu also serves that loader, which downloads macos/run.js from /d/m/client. To publish a script, push its source file and named runners, then add an entry to scripts.json with category, name, desc, and source; add runner when a desktop runner exists. Discord entries automatically appear in the macOS picker. The library page and menus read that manifest. GitHub's cache can take up to 5 minutes to update.