tools.discord_embed module

discord_embed tool: build and post a rich Discord embed to a channel.

Single-tool module in the tools/ plugin format (TOOL_NAME / TOOL_DESCRIPTION / TOOL_PARAMETERS / run) that lets the LLM emit a fully structured Discord embed from a JSON spec instead of plain text. The module is discovered and registered by tool_loader.py, and its run() handler is dispatched by name from the tool loop; it talks to Discord through the gateway’s cached discord.Client (resolved via tools._discord_helpers) rather than over raw HTTP itself.

async tools.discord_embed.run(channel_id, embed_spec, content=None, ctx=None)[source]

Execute this tool and return the result.

Parameters:
  • channel_id (str) – Discord/Matrix channel identifier.

  • embed_spec (str) – The embed spec value.

  • content (str | None) – Content data.

  • ctx (ToolContext | None) – Tool execution context providing access to bot internals.

Returns:

Result string.

Return type:

str