-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
The Discord channel adapter currently ignores all messages from other bots (i.e., messages where message.author.bot == true). This prevents bot-to-bot interactions, which are needed in multi-agent setups where different agent frameworks coexist in the same Discord server.
Use Case
I run OpenFang alongside another agent framework (OpenClaw) in the same Discord server. Each framework has its own bots. When an OpenClaw agent bot @mentions the OpenFang bot in a channel, OpenFang silently ignores the message.
In a multi-agent architecture, it's common for agents on different platforms to communicate through shared channels. The current hard-coded bot filtering makes this impossible via Discord.
Proposed Solution
Add a configuration option to the Discord channel:
[channels.discord]
enabled = true
bot_token_env = "DISCORD_BOT_TOKEN"
ignore_bots = true # default: true (current behavior)When ignore_bots = false, the Discord adapter should process messages from other bots the same way it processes messages from human users.
Optional Safeguards
To prevent infinite bot loops, consider:
- An
allowed_bot_idslist to whitelist specific bots - A rate limit or cooldown for bot-originated messages
- A max reply chain depth to break loops
Current Workaround
Using OpenFang's HTTP REST API via an MCP bridge for cross-framework communication. This works but bypasses the natural Discord conversation flow.
Environment
- OpenFang version: 0.3.26
- OS: macOS (Darwin arm64)