INNER CODE UNIT · Python

send_channel_message

existence-master/Sentient · src/server/mcp_hub/discord/main.py:62

async def send_channel_message(ctx: Context, channel_id: str, content: str) -> Dict:
    """
    Sends a text message to a specific Discord channel, identified by its `channel_id`.
    """
    logger.info(f"Executing tool: send_channel_message to channel_id='{channel_id}'")
    return await _execute_tool(ctx, "send_channel_message", channel_id, content)

# --- Server Execution ---
if __name__ == "__main__":
    host = os.getenv("MCP_SERVER_HOST", "127.0.0.1")
    port = int(os.getenv("MCP_SERVER_PORT", 9022))
    
    print(f"Starting Discord MCP Server on http://{host}:{port}")
    mcp.run(transport="sse", host=host, port=port)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…