Skip to the content.

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:

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:

  1. opens the right channel in Discord (SELECT_TEXT_CHANNEL, official);
  2. brings Discord to the front for a split second, pastes the text and presses Enter;
  3. 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)

  1. Go to https://discord.com/developers/applications → New Application, name it (e.g. “Raidtech Edge”).
  2. OAuth2 tab:
    • copy the Client ID and the Client Secret (Reset Secret if needed);
    • in Redirects, add http://localhost and save.
  3. 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.

  4. 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

What Discord does not provide (checked)

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