Openclaw Zalo Mod

v2.3.0

Zero-token Zalo group moderation plugin for OpenClaw — slash commands, anti-spam, warn system, and memory integration.

openclaw-zalo-mod·runtime zalo-mod·by @tuanminhhole
Code Pluginsource linkedCommunity code plugin. Review compatibility and verification before install.

README

🛡️ zalo-mod — Zero-Token Zalo Group Moderation

OpenClaw runtime plugin for Zalo group administration. Handles moderation, slash commands, and anti-spam with zero LLM token cost. Only @mention queries are forwarded to the AI agent.

License: MIT OpenClaw Plugin

🇻🇳 Đọc bằng tiếng Việt


✨ Features

FeatureToken CostDescription
Slash Commands0/noi-quy, /menu, /huong-dan, /groupid, /ownerid, /report, /rules
Warn System0/warn @name [reason] — track warnings per member
Anti-Spam0Auto-detect repeated messages, link spam, emoji flood
Admin Notes0/note [text] — admin-only notes
Memory Sync0/memory — save full digest to skills/memory/
Smart Q&A0Auto-answer "who's warned?" "violations?" from local data
Sticker Detection0Transform raw sticker JSON to [Sticker] for agent
@Mention✅ uses tokensForward to LLM only for real questions

🏗️ Architecture

Incoming Zalo message
    │
    ├─ /slash command     → Plugin handles locally (0 tokens)
    ├─ Spam detected      → Log + block silently (0 tokens)
    ├─ Sticker/media      → Transform to [Sticker] (0 tokens)
    ├─ "Who's warned?"    → Plugin answers from store (0 tokens)
    │
    └─ @BotName question  → Forward to LLM agent (uses tokens)

📦 Installation

From ClawHub (recommended)

openclaw plugins install zalo-mod

Manual

  1. Copy the plugin to your extensions/ directory:
# Windows
xcopy /E /I openclaw-zalo-mod %OPENCLAW_HOME%\extensions\zalo-mod

# Linux / macOS
cp -r openclaw-zalo-mod ~/.openclaw/extensions/zalo-mod
  1. Restart the gateway:
openclaw gateway restart

Path resolution

zalo-mod does not require a .env file in native installs. At runtime it resolves OpenClaw config in this order:

  1. OPENCLAW_HOME environment variable, used by Docker/openclaw-setup.
  2. The plugin install path, usually {OPENCLAW_HOME}/extensions/zalo-mod.

After the bot receives a group message, run /groupid in that group. The plugin scans saved Zalo sessions and writes both watchGroupIds and groupNames to openclaw.json.

🛑 Anti-Spam Detection

TypeDetection
Repeat SpamSame message sent N times within the time window
Link SpamMessages containing suspicious URLs (bit.ly, tinyurl, affiliate links)
Emoji FloodMessages with 5+ consecutive emojis

Violations are logged to the store and synced to violations.md.

🤖 Smart Auto-Answer

When someone @mentions the bot with common group management questions, zalo-mod answers directly from the local store — no LLM tokens used:

Question PatternSource
"Who's warned?" / "Ai bị warn?"store.getWarned()
"Violations?" / "Vi phạm?"store.getViolations()
"Who's admin?" / "Admin là ai?"Config response

All other @mention questions are forwarded to the LLM agent.

🔧 Requirements

  • OpenClaw >= 2026.3.24
  • zalouser channel configured and authenticated
  • Node.js >= 20

📄 License

MIT — see LICENSE

Capabilities

configSchema
Yes
Executes code
Yes
HTTP routes
0
Plugin kind
runtime
Runtime ID
zalo-mod

Compatibility

Built With Open Claw Version
2026.3.24
Min Gateway Version
2026.3.24
Plugin Api Range
>=2026.3.24
Plugin Sdk Version
2026.3.24

Verification

Tier
source linked
Scope
artifact only
Summary
Validated package structure and linked the release to source metadata.
Commit
7f1fe57a4d7a
Tag
master
Provenance
No
Scan status
pending

Tags

latest
2.3.0