Skip to main content

Module discord

Module discord 

Source
Expand description

Discord messaging bridge โ€” Gateway WebSocket + REST send.

Lifecycle:

  1. DiscordBridge::init_global(config, http) โ€” call once at startup.
  2. The gateway loop runs in a background tokio task (auto-reconnects).
  3. DiscordBridge::get() returns the singleton for HTTP handler use.
  4. bridge.send(msg) enqueues a message for the REST client.
  5. bridge.health() returns the current connection status.

Modulesยง

gateway ๐Ÿ”’
Discord Gateway WebSocket client.
rest
Discord REST API client โ€” message send only.
types
Discord Gateway and REST API wire types.

Structsยง

DiscordBridge
DiscordConfig

Staticsยง

GLOBAL_BRIDGE ๐Ÿ”’