Repository navigation
Fake Discord app for testing without Discord - #9
Open
NickMarcha wants to merge 1 commit into
Open
NickMarcha wants to merge 1 commit into
NickMarcha wants to merge 1 commit into
Conversation
tools/fake-discord stands in for the Discord desktop app: the IPC protocol d-scribe uses (with PKCE, single-use codes, rotating refresh tokens and subscription rules), the token and guilds HTTP endpoints, and scenario files with people joining, talking (WAV clips or tones) and leaving. Typed commands change the call while it runs. d-scribe connects to it when DSCRIBE_DISCORD_IPC and DSCRIBE_DISCORD_API are set, and then keeps the login in discord_tokens.fake.json so the real one is untouched. The Rust tests now sign in against the fake (popup, code exchange over HTTP, refresh, revoked token, cancelled popup) and connect to it on a real named pipe. CI runs the fake's own tests too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #8 (base
platform-seams); retarget toreleaseonce #8 is merged.tools/fake-discordstands in for the Discord desktop app, so d-scribe can be tested without Discord, a second account or anyone to call. Seetools/fake-discord/README.md.What it does
redirect_uri, refresh tokens rotate, speaking events only reach subscribed connections.POST /oauth2/tokenandGET /v10/users/@me/guilds.--tones(a pitch per person); Discord closing; a cancelled popup; a revoked login. Three examples are inscenarios/.join,speak 201 3,say 201 clip.wav,close,reject on...).App changes (dev switches)
DSCRIBE_DISCORD_IPC: connect to this pipe/socket instead ofdiscord-ipc-N(also used for the "Discord running" check).DSCRIBE_DISCORD_API: replaceshttps://discord.com/api.discord_tokens.fake.json(the real login is untouched), and the log says a fake Discord is in use.Tests
DSCRIBE_DISCORD_IPC.tools/fake-discord/tests/protocol.rs).rust:1.91): 27 and 8, no warnings. CI runs the fake's tests too.🤖 Generated with Claude Code