Regole dei gruppi con requireMention e mentionPatterns
Imposti requireMention nei gruppi e mentionPatterns nei messaggi, così OpenClaw risponderà solo quando viene chiamato esplicitamente.
Regole dei gruppi con requireMention e mentionPatterns è una lezione OpenClaw Academy gratuita su CoddyKit. Questa è la lezione 3 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento OpenClaw Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso OpenClaw Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
Calm in Group Chats
In a busy group, you do not want your assistant replying to everything. Group rules let it stay quiet until it is actually addressed. 🤫
Meet requireMention
The key for this is requireMention. Turn it on for a group and OpenClaw only answers when someone explicitly mentions it.
groups: {
"*": { requireMention: true }
}The Star Means All
That * wildcard means every group. Setting requireMention under it applies the rule to all groups on that channel at once.
Where It Lives
requireMention sits inside a channel's groups block. So it is per platform, letting you keep group manners channel by channel.
whatsapp: {
groups: { "*": { requireMention: true } }
}Meet mentionPatterns
Next, how does it know it was mentioned? mentionPatterns lists the words that count as calling your assistant by name.
messages: {
groupChat: { mentionPatterns: ["@openclaw"] }
}Where mentionPatterns Sits
mentionPatterns lives under messages.groupChat. It is a list, so you can register more than one way people might tag the assistant.
Adding Patterns
Want a friendlier handle? Add more entries to the list. Any matching mention in a group will wake your assistant up.
mentionPatterns: ["@openclaw", "@claw"]How They Work Together
The two pair up: requireMention says wait to be called, and mentionPatterns defines what being called sounds like.
A Combined Example
Here both keys work as a team in openclaw.json: groups require a mention, and the patterns define the trigger word.
channels: { whatsapp: {
groups: { "*": { requireMention: true } }
} }Less Noise
Together these settings cut the noise. Your assistant ignores normal chatter and steps in only when a group member tags it.
Apply and Test
Save the file, restart OpenClaw, then send a mention in a group. A reply confirms your patterns and requireMention are working.
Quick Check
Match each key to its job.
Recap
You tamed group chats: requireMention waits to be called, and mentionPatterns defines the call. Next, the smart defaults. ✅
Impara Bash con un tutor IA — gratis
Scrivi ed esegui vero codice nel tuo browser, ricevi aiuto istantaneo da un tutor IA disponibile 24/7, e riprendi da dove hai lasciato sul web o nell'app.
- Corsi
- 10
- Lezioni
- 40
Domande Frequenti
La lezione «Regole dei gruppi con requireMention e mentionPatterns» è gratuita?
Sì — il testo completo di «Regole dei gruppi con requireMention e mentionPatterns» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso OpenClaw Academy, passa a CoddyKit PRO. Il corso OpenClaw Academy include 4 lezioni in totale.
Cosa imparerò in «Regole dei gruppi con requireMention e mentionPatterns»?
Imposti requireMention nei gruppi e mentionPatterns nei messaggi, così OpenClaw risponderà solo quando viene chiamato esplicitamente. Eserciti OpenClaw Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare OpenClaw Academy?
Non è richiesta alcuna esperienza precedente. OpenClaw Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 3 di 4.
Quanto tempo richiede la lezione «Regole dei gruppi con requireMention e mentionPatterns»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione OpenClaw Academy?
Sì. Ogni lezione OpenClaw Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Il file di configurazione openclaw.json
- Inserire i mittenti nella allowlist con allowFrom
- Regole dei gruppi con requireMention e mentionPatterns
- Impostazioni predefinite senza configurazione