Discord module
Since Raidtech Edge Hub 0.10, Discord is installed from the Store on the Edge (Store → Discord → Install). If you had set it up before, the hub installs it by itself and keeps your settings.
From the Edge:
- the voice channel you are in, who is speaking, mute / deafen, hang up;
- mic and sound volume, voice activity / push to talk;
- per participant: volume for you (0–200 %) and “Mute for me”;
- your favorite and recent channels (default page when not in a channel), all your servers and their channels, with who is inside;
- the voice channel’s chat, or a text channel you pick, with images, GIFs, links (opened on the PC), replies and reactions;
- camera, screen share, soundboard; microphone and output choice, noise suppression, echo cancellation, gain;
- notifications: DMs and mentions as pop-ups, 🔔 tab, incoming call banner (Answer / Decline), also in the island on the other modules;
- send a message (input bar + quick replies);
- hold Mic to talk, hold Leave to hang up, streamer mode (blurs messages and names);
- direct messages: conversation list (bubble button in “Channels”), read and send;
- pinned servers: kept at the top of the servers menu (grid button); the left column shows recent servers;
- system messages in the chat (call started / missed with its length, join, pinned message, boost…);
- big chat (⤢ button in the chat) and full images, full screen on tap;
- streams: in a call, the screen button next to the 🔔 opens the call in Discord on the PC, where you click a stream.
Favorites, recents, picked text channel, pinned servers and known DMs are kept in
channels.json (same folder as discord.json).
Direct messages
Discord’s RPC does not list direct conversations. The hub therefore remembers every conversation it sees: DM or call notification (Discord window not in front), private call joined, conversation opened from the Edge. The name comes from the notification or the other person’s last message. A conversation can be removed from the list (✕) without changing anything in Discord.
Per-person volume
The RPC value is not the percentage Discord shows. Measured on the client: shown = 100 × ∛(RPC value / 100) (RPC 61.3 ↔ 84 %, rounded down like Discord). The hub converts both ways: the Edge shows the same percentage as Discord. The slider snaps to 100 %.
Streams
Discord does not expose a stream’s picture through the RPC: it cannot be watched on the Edge. It does not even say who
streams: the voice states it sends have no self_stream (checked on the current client), so the “LIVE” badge on the
Edge only shows if a future version sends it. The screen button in the header opens the call in Discord, where you click
the stream.
Sending messages
Discord’s RPC has no send command. Like other Discord tools for Stream Deck / Edge, the hub:
- opens the right channel in Discord (
SELECT_TEXT_CHANNEL, official); - brings Discord to the front for a split second, pastes the text and presses Enter;
- puts back the previous window and your clipboard.
Limits: Discord must be open (if minimized, it is restored then minimized again); a game running as administrator blocks typing; the hub checks that Discord really is in front before pasting and gives up otherwise.
Notifications
Discord only sends notifications (DMs, mentions, calls) when its window is not in front, and only the ones it would
show itself (server notification settings apply).
Answering a call uses SELECT_VOICE_CHANNEL on the private conversation (official, no keyboard).
RPC has no way to decline a call: Decline brings Discord in front for a moment, presses its own shortcut (Esc)
and gives the focus back, like sending a message.
A conversation opened in a chat on the Edge counts as read there: its notifications leave the 🔔 list. Discord itself
still shows it unread (RPC cannot mark messages as read).
Island
While you are in a voice channel and another module is on screen, a small black pill at the top shows the faces of the people in the call (green ring: speaking), a mic key and hang up (hold). Tap the faces to open Discord. An incoming call shows there too, with Answer / Decline. It grows for a moment when someone joins or leaves the channel (their face, “joined” / “left”), and shows DMs and mentions for a few seconds (tap: the conversation opens in the Discord module; streamer mode blurs the text). Its motion (drop in, morph, ripples, ringing light) follows the Animations switch of the module’s settings, not Windows’ “Animation effects”.
How it works
The hub connects to the Discord app’s local RPC (named pipe \\.\pipe\discord-ipc-0): nothing goes through a
third-party server. It only exchanges the authorization code for a token with discord.com, and downloads avatars
from cdn.discordapp.com (cached in the module folder, served to the widget by the hub).
Discord reserves the RPC permissions (rpc, rpc.voice.*, messages.read, rpc.notifications.read,
rpc.video.*, rpc.screenshare.*) to the owner of a developer application and its testers (50 max). An
application shared by every Raidtech Edge user is therefore not possible without Discord’s approval: everyone creates
their own application (2 minutes, free). Other community tools (Stream Deck plugins, overlays…) do the same.
Setup (once)
- Go to https://discord.com/developers/applications → New Application, name it (e.g. “Raidtech Edge”).
- OAuth2 tab:
- copy the Client ID and the Client Secret (Reset Secret if needed);
- in Redirects, add
http://localhostand save.
- Right-click the Raidtech Edge Hub icon → Discord settings… and fill in:
{ "clientId": "123456789012345678", "clientSecret": "your-secret", "redirectUri": "http://localhost" }(file:
%APPDATA%\RaidtechEdge\modules-data\discord\discord.json). The hub reloads it by itself when saved. - On the Edge, open Discord → Authorize in Discord, then accept the window that opens in Discord.
The token is kept in tokens.json (same folder) and renewed automatically: authorization is only asked once.
If you use another Discord account than the one owning the application, add it under the application’s App Testers.
Security
discord.jsonandtokens.jsonstay on your PC, in your Windows profile. Do not share them.- The widget never sees the secret or the token: it only receives the state (channel, participants, mic/sound).
- To revoke everything: Discord → Settings → Authorized Apps → remove the application, and delete
tokens.json.
What Discord does not provide (checked)
- Sending a message: no RPC command (hence the simulated typing above).
- “You are talking while muted” warning: Discord sends no speaking event while the mic is muted.
- Voice channel status: missing from the returned data.
- Full profile (bio, banner, roles): only name, nickname, avatar.
- Presences / games: only for your friends, with the
relationships.readpermission (to be tested).
Reading this information from the Discord client itself (account token, code injection) is against Discord’s terms and can get the account banned: the project does not do it.
Protocol
See DISCORD_ID in packages/protocol/src/index.ts: every action and event is described there.
Images (avatars, icons, emojis, attachments, previews) go through the hub, which only relays Discord addresses
seen in messages; a link is only opened on the PC if it is in the message.
status |
Meaning |
|---|---|
unconfigured |
discord.json empty or incomplete |
offline |
Discord is not running (retried every 5 s) |
connecting |
connecting |
unauthorized |
connected, but not authorized yet (button on the Edge) |
authorizing |
authorization window open in Discord |
ready |
everything works |
error |
e.g. Client ID refused by Discord |