openclaw message

إرسال رسائل وملفات عبر قنوات OpenClaw (Telegram، Discord، WhatsApp، إلخ).

الاستخدام الأساسي

openclaw message send [options] <message>

الأمثلة

إرسال رسالة نصية

# إرسال عبر Telegram
openclaw message send --channel telegram --target @username "Hello!"

# إرسال عبر Discord
openclaw message send --channel discord --target 123456789 "Hello server!"

# إرسال عبر WhatsApp
openclaw message send --channel whatsapp --target +1234567890 "Hi there!"

إرسال ملفات

# إرسال صورة
openclaw message send --channel telegram --target @user \
  --file photo.jpg "Check this out!"

# إرسال مستند
openclaw message send --channel telegram --target @user \
  --file report.pdf --caption "Monthly report"

# إرسال ملفات متعددة
openclaw message send --channel telegram --target @user \
  --file image1.jpg --file image2.jpg --file doc.pdf

الرد على رسالة

# الرد على رسالة محددة
openclaw message send --channel telegram --target @user \
  --reply-to 12345 "Replying to your message"

# اقتباس نص من الرسالة الأصلية
openclaw message send --channel telegram --target @user \
  --reply-to 12345 --quote "Original text" "My reply"

رسائل خاصة

# رسالة صامتة (بدون إشعار)
openclaw message send --channel telegram --target @user \
  --silent "This won't notify"

# رسالة ذاتية الحذف
openclaw message send --channel telegram --target @user \
  --self-destruct 60 "This will disappear in 60 seconds"

# رسالة بمؤثر خاص (Telegram)
openclaw message send --channel telegram --target @user \
  --effect invisible-ink "Secret message"

الخيارات

الخيارالوصف
-c, --channel <name>اسم القناة (telegram, discord, whatsapp, etc.)
-t, --target <id>معرف المستلم (username, chat ID, phone number)
-f, --file <path>ملف للإرسال (قابل للتكرار)
--caption <text>تعليق على الملف المرسل
--reply-to <id>معرف الرسالة المراد الرد عليها
--quote <text>اقتباس نص من الرسالة الأصلية
--silentإرسال بدون إشعار صوتي
--effect <name>مؤثر خاص (invisible-ink, balloons, etc.)
--self-destruct <sec>حذف تلقائي بعد ثوانٍ محددة
--jsonإخراج معلومات الرسالة بتنسيق JSON
--dry-runمعاينة بدون إرسال فعلي

إدارة الرسائل

تعديل رسالة

# تعديل رسالة موجودة
openclaw message edit --channel telegram \
  --message-id 12345 "Updated text"

# تعديل مع الاحتفاظ بالملفات
openclaw message edit --channel telegram \
  --message-id 12345 --keep-media "New caption"

حذف رسالة

# حذف رسالة واحدة
openclaw message delete --channel telegram --message-id 12345

# حذف رسائل متعددة
openclaw message delete --channel telegram \
  --message-id 12345 --message-id 12346 --message-id 12347

التفاعل مع رسائل

# إضافة تفاعل emoji
openclaw message react --channel telegram \
  --message-id 12345 --emoji "👍"

# إزالة تفاعل
openclaw message react --channel telegram \
  --message-id 12345 --emoji "👍" --remove

أمثلة متقدمة

إرسال بث (Broadcast)

# إرسال لعدة مستخدمين
openclaw message broadcast --channel telegram \
  --targets users.txt "Important announcement"

# مع تأخير بين الرسائل
openclaw message broadcast --channel telegram \
  --targets users.txt --delay 2000 "Hello everyone"

إرسال رسائل مجدولة

# جدولة رسالة للإرسال لاحقاً
openclaw message send --channel telegram --target @user \
  --schedule "2024-12-25 09:00" "Merry Christmas!"

# استخدام التوقيت النسبي
openclaw message send --channel telegram --target @user \
  --schedule "+2h" "Reminder in 2 hours"

إرسال استطلاعات (Polls)

# إنشاء استطلاع
openclaw message poll --channel telegram --target @groupchat \
  --question "What's your favorite color?" \
  --option "Red" --option "Blue" --option "Green"

# استطلاع متعدد الخيارات
openclaw message poll --channel telegram --target @groupchat \
  --question "Select all that apply" \
  --option "Option 1" --option "Option 2" --multi

أنواع الملفات المدعومة

الصور

jpg, jpeg, png, gif, webp, svg

الفيديو

mp4, mov, avi, webm, mkv

الصوت

mp3, ogg, wav, flac, m4a

المستندات

pdf, doc, docx, txt, zip

المؤثرات الخاصة (Telegram)

🎭
invisible-ink-نص مخفي يظهر عند النقر
🎈
balloons-بالونات تطير على الشاشة
🎉
confetti-قصاصات ورق ملونة
🔥
fire-تأثير النار

💡 نصائح

  • استخدم --dry-run لمعاينة الرسالة قبل الإرسال
  • الملفات الكبيرة قد تستغرق وقتاً أطول - استخدم --verbose لمتابعة التقدم
  • بعض المؤثرات الخاصة متاحة فقط على منصات معينة
  • راجع حدود حجم الملفات لكل قناة في وثائق القناة

استكشاف الأخطاء

فشل إرسال الرسالة

# التحقق من حالة القناة
openclaw channels status telegram

# إعادة المحاولة مع verbose
openclaw message send --channel telegram --target @user \
  --verbose "Test message"

ملف كبير جداً

# ضغط الملف أولاً
zip compressed.zip large-file.pdf
openclaw message send --channel telegram --target @user \
  --file compressed.zip

# أو استخدم خدمة تخزين سحابي
openclaw message send --channel telegram --target @user \
  "File too large, here's the link: https://..."

⚠️ ملاحظات مهمة

  • تأكد من أن القناة المستهدفة نشطة ومكونة بشكل صحيح
  • بعض الميزات قد تكون محدودة بناءً على نوع القناة
  • احترم معدلات الحد (rate limits) لتجنب الحظر
  • الرسائل المحذوفة قد لا يمكن استعادتها

الأوامر ذات الصلة

  • openclaw channels - إدارة القنوات
  • openclaw directory - البحث عن مستخدمين ومجموعات
  • openclaw cron - جدولة رسائل متكررة