Skip to content

[Bug]: Bot responds to commands addressed to other bots in group chats #36

@liuh886

Description

@liuh886

What happened?

In group chats with multiple bots, ductor incorrectly responds to commands even when they are explicitly addressed to another bot (e.g., /model@other_bot). This violates the Telegram convention where /cmd@botname should only be handled by the specified bot.

The problem seems the ductor_bot/bot/middleware.py, which ignore @ and send command to all bots. My suggests is limit to /command but except for /command@bot1

Steps to Reproduce

  1. in group chat, and set the bot to admin
  2. /model@bot1
  3. all bot response /model command

Expected Behavior

The command handling logic should be updated to explicitly ignore any command that contains a mention suffix
(@botName) if that botname does not match the bot's name, regardless of the group_mention_only setting.

In other words, /model@bot1 should be treated differently with the /model, that all bots response.

Operating System

Windows

Environment

Docker

Which LLM provider?

Gemini

ductor version

0.12.0

/diagnose output


Relevant log output

LLM self-diagnosis (optional)

No response

Additional context

No response

Before submitting

  • I have searched existing issues for duplicates.
  • I am running the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions