กฎกลุ่มด้วย requireMention และ mentionPatterns
ตั้งค่า requireMention ของกลุ่มและ mentionPatterns ของข้อความ เพื่อให้ OpenClaw ตอบกลับเมื่อมีการระบุถึงอย่างชัดเจนเท่านั้น
กฎกลุ่มด้วย requireMention และ mentionPatterns เป็นบทเรียน OpenClaw Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน OpenClaw Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส OpenClaw Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
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. ✅
คำถามที่พบบ่อย
บทเรียน “กฎกลุ่มด้วย requireMention และ mentionPatterns” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “กฎกลุ่มด้วย requireMention และ mentionPatterns” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส OpenClaw Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส OpenClaw Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “กฎกลุ่มด้วย requireMention และ mentionPatterns”
ตั้งค่า requireMention ของกลุ่มและ mentionPatterns ของข้อความ เพื่อให้ OpenClaw ตอบกลับเมื่อมีการระบุถึงอย่างชัดเจนเท่านั้น คุณปฏิบัติ OpenClaw Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน OpenClaw Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน OpenClaw Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน
บทเรียน “กฎกลุ่มด้วย requireMention และ mentionPatterns” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน OpenClaw Academy นี้ได้ไหม
ได้ บทเรียน OpenClaw Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- ไฟล์การกำหนดค่า openclaw.json
- อนุญาตผู้ส่งด้วย allowFrom
- กฎกลุ่มด้วย requireMention และ mentionPatterns
- ค่าเริ่มต้นเมื่อไม่ได้ตั้งค่าใด ๆ