discourse-chat-bridge
discourse-chat-bridge copied to clipboard
bridge between Discourse and Telegram | Matrix

Discourse-chat-bridge
جسر بين منصة Discourse وبرامج التواصل .
- تيليجرام - مدعوم
- matrix - مدعوم
مميزات الجسر
- عرض آخر موضوع تم نشره 📄
- عرض الفئات ⬇️
- كتابة موضوع جديد 📝
- كتابة تعليق جديد 💬
- إرسال رسالة خاصة 🔒
- ربط حسابك على منصة Discourse
- تفعيل البوت لتلقي آخر المواضيع المنشورة
| الأمر | صورة |
|---|---|
| start | ![]() |
| get_latest_posts | ![]() |
| getCategories | ![]() |
| CreatePosts | ![]() |
| sendComment | ![]() |
| sendMessagePrivate | ![]() |
| discourse | ![]() |
| activation | ![]() |
تثبيت البوت
يجب عليك إنشاء مفتاح api عبر لوحة تحكم Discourse



قم بإختيار جميع المستخدمين

قم بتحديدعلى صلاحية الكتابة

احفظ المفتاح في مكان آمن واضغط على متابعة
بعد الإنتهاء من إنشاء مفتاح api قم بإستنساخ المستودع
git clone https://github.com/aosus/discourse-chat-bridge
آلان قم بإضافة متغيرات البيئة
- url
- discourse_forum_name
- discourse_token
- discourse_username
- telegram_token
- matrix_username
- matrix_password
- matrix_homeserver_url
- matrix_access_token
- matrix_autojoin
- dataPath
- matrix_encryption
- language
مثال
linux
export url="https://discourse.aosus.org"
windows
setx url="https://discourse.aosus.org"
أو قم بتعديل على ملف config.json
ملاحظة / الأولوية لمتغيرات البيئة اذا وجدت
cd discourse-chat-bridge
nano config.json
{
"url": "https://$DISCOURSE_DOMAIN",
"discourse_forum_name": "discourse forum name",
"discourse_token": "discourse tokin",
"discourse_username": "system",
"telegram_token": "telegram token",
"matrix_username": "Username to your Matrix account #aosus",
"matrix_password": "Password to your Matrix account #*****",
"matrix_homeserver_url": "https://matrix.org",
"matrix_access_token": "Put your matrix_access_token here #npm run generate_matrix_token",
"matrix_autojoin": true,
"dataPath": "storage",
"matrix_encryption": true,
"language": "ar"
}
بعد التعديل على ملف config.json قم بحفظه ثم قم بتثبيت التبعيات وتشغيل البوت
npm i
npm run generate_matrix_token
npm start
or
node index.js
ملاحظة / عند كتابة الأمر npm run generate_matrix_token سيتم توليد التوكن لـ (Matrix) بشكل تلقائي وحفظه في ملف config.json







