Skip to content

Trigger Configuration Triggers

Configure how AI responds to messages.

Basic Configuration

yaml
trigger:
  private: always         # Private chat trigger
  group: at              # Group chat trigger
  prefix: "#chat"        # Command prefix

Trigger Types

TypeDescriptionExample
alwaysAlways respondAny message
at@mention required@bot hello
prefixPrefix required#chat hello
keywordKeyword matchContains "help"
randomRandom chance5% probability
noneDisabledNo response

Private Chat

yaml
trigger:
  private: always        # Respond to all private messages

Options: always, prefix, none

Group Chat

yaml
trigger:
  group: at              # Respond when @mentioned

Options: at, prefix, keyword, random, atAll, none

Multiple Triggers

Enable multiple trigger methods:

yaml
trigger:
  group:
    - at                 # @mention
    - prefix             # Or prefix
  prefix: "#ai"

Keyword Trigger

yaml
trigger:
  group: keyword
  keywords:
    - "ai"
    - "机器人"
    - "help"
  keywordMode: contains  # contains, startsWith, exact

Random Trigger

yaml
trigger:
  group: random
  randomRate: 0.05       # 5% chance

Per-Group Override

yaml
groups:
  123456789:
    trigger:
      mode: prefix
      prefix: "#gpt"
  987654321:
    trigger:
      mode: at

Cooldown

Prevent spam with cooldown:

yaml
trigger:
  cooldown:
    enabled: true
    duration: 5000       # 5 seconds
    perUser: true        # Per-user cooldown

Web Panel

Configure triggers in Web Admin Panel:

  1. Go to Groups tab
  2. Select a group
  3. Configure trigger settings
  4. Save

Next Steps

Released under the MIT License