> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatbotplatform.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Should Respond Detection

> Control when your bot responds to messages

Should respond detection determines whether your bot should reply to an incoming message. This prevents your bot from responding to every message in group chats or channels where it shouldn't.

## Overview

In group environments, your bot receives all messages but shouldn't respond to everything:

* **Direct mentions**: @YourBot should trigger a response
* **Replies to bot**: Continuing a conversation with the bot
* **Private messages**: Always respond in DMs
* **Random chatter**: Don't interrupt human conversations

## How It Works

When a message arrives, the bot evaluates:

1. **Is this a private chat?** Always respond
2. **Was the bot mentioned?** Respond to @mentions
3. **Is this a reply to the bot?** Continue the conversation
4. **Is this in a monitored channel?** Apply channel rules

```
Message arrives
    ↓
Private chat? → Yes → Respond
    ↓ No
Bot mentioned? → Yes → Respond
    ↓ No
Reply to bot? → Yes → Respond
    ↓ No
Don't respond (silent)
```

## Configuration

Configure should respond detection in your bot's behavior settings:

<Steps>
  <Step title="Navigate to Behaviors">
    Go to your bot settings and click the **Behaviors** tab.
  </Step>

  <Step title="Enable Should Respond Detection">
    Toggle on **Should Respond Detection** to filter messages.
  </Step>

  <Step title="Configure Triggers">
    Select which conditions should trigger a response:

    * Mentions (@bot)
    * Direct replies
    * Keywords (optional)
  </Step>

  <Step title="Save Settings">
    Click **Save** to apply changes.
  </Step>
</Steps>

## Platform-Specific Behavior

### Telegram

**Private Chats**:

* Always respond to all messages
* No filtering needed

**Groups**:

* Respond to @mentions
* Respond to replies to bot messages
* Optionally respond to all messages (not recommended for busy groups)

**Channels**:

* Bots cannot receive messages in channels
* Only works in linked discussion groups

### Slack

**Direct Messages**:

* Always respond

**Channels**:

* Respond to @mentions
* Respond to thread replies where bot is participant
* Can be configured to respond to all messages in specific channels

**App Home**:

* Always respond (dedicated bot space)

### Discord (Coming Soon)

**Direct Messages**:

* Always respond

**Server Channels**:

* Respond to @mentions
* Respond to replies
* Slash command support

## Trigger Types

### @Mention Detection

Bot responds when explicitly mentioned:

```
User: @SupportBot I need help with billing
Bot: I'd be happy to help with billing! What's your question?
```

**Supported formats**:

* `@BotName` - Standard mention
* `@botname` - Case insensitive
* Bot username without @ (configurable)

### Reply Detection

Bot responds when user replies to a bot message:

```
Bot: Here's your order status...
User: [Replying to Bot] What about shipping?
Bot: Your order will ship tomorrow...
```

This maintains conversation context without requiring mentions.

### Keyword Triggers (Optional)

Configure specific keywords that trigger responses:

```
Keywords: "help", "support", "question"

User: I have a question about my account
Bot: [Responds because "question" was detected]
```

<Callout type="warning">
  Use keyword triggers carefully in busy channels. They can cause the bot to respond unexpectedly.
</Callout>

## Best Practices

<CardGroup cols={2}>
  <Card title="Start Strict" icon="shield">
    Enable only mentions and replies initially
  </Card>

  <Card title="Test in Groups" icon="users">
    Verify bot doesn't over-respond in group chats
  </Card>

  <Card title="Review Conversations" icon="messages">
    Check conversations for false positives
  </Card>

  <Card title="Respect Users" icon="heart">
    Don't interrupt human conversations
  </Card>
</CardGroup>

### Group Chat Etiquette

In group chats, your bot should:

* **Wait to be addressed**: Don't jump into every conversation
* **Stay on topic**: Only respond to relevant queries
* **Be helpful, not annoying**: Quality over quantity
* **Know when to be silent**: Sometimes no response is best

## Troubleshooting

### Bot Not Responding

**Possible causes**:

* Should respond detection is filtering the message
* Bot not mentioned correctly
* Reply detection not matching

**Solutions**:

* Check trigger configuration
* Verify mention format for platform
* Test with explicit @mention

### Bot Responding Too Much

**Possible causes**:

* Detection disabled
* Keyword triggers too broad
* Responding to all messages enabled

**Solutions**:

* Enable should respond detection
* Review and narrow keyword triggers
* Disable "respond to all" in groups

### Inconsistent Behavior

**Possible causes**:

* Platform-specific quirks
* Caching issues
* Configuration not saved

**Solutions**:

* Test on specific platform
* Clear bot cache
* Verify settings saved correctly

## Next Steps

<CardGroup cols={2}>
  <Card title="Response Timing" icon="clock" href="/bots/behaviors/response-timing">
    Control response delays
  </Card>

  <Card title="Typing Indicators" icon="message-dots" href="/bots/behaviors/typing-indicators">
    Show visual feedback while responding
  </Card>
</CardGroup>
