مزامنة Discord مزامنة منتدى Discourse مع خادم Discord
يتيح هذا الملحق مزامنة بعض العناصر المتعلقة بالمستخدم بين مثيلة منتدى Discourse وخادم Discord. سيقوم بإنشاء روبوت Discord للتعامل مع جميع الأذونات وتفعيلها مع بعض الإجراءات في الخادم.
الميزات
مزامنة مجموعات Discourse مع أدوار Discord
سيدير تلقائيًا الأدوار في خادم Discord بناءً على المجموعات التي يتمتع المستخدم بالوصول إليها في Discourse.
دور موثق
يمكنك إضافة “دور موثق” سيتم منحه لجميع مستخدمين Discord الذين قاموا بربط حساب Discord.
أدوار آمنة
بما أن هذا الملحق سيفرض وجود نفس الأدوار في Discord مثل المجموعات في Discourse، يمكنك تعيين قائمة بالأدوار التي سيتجاهلها الروبوت ويمكنك إدارتها يدويًا في خادم Discord.
مزامنة اسم مستخدم Discourse مع اللقب في Discord
إذا كنت ترغب في التعرف على المستخدمين من خلال اسم مستخدم المنتدى، فيمكنك إجبارهم على أن يكون لديهم نفس اللقب في خادم Discord مثل اسم المستخدم الذي لديهم في Discourse.
المحفزات
سيقوم الملحق بتشغيل مزامنة كاملة من Discourse إلى Discord (اللقب والأدوار) في الحالات التالية:
Discourse
تمت إضافة مستخدم إلى مجموعة
تمت إزالة مستخدم من مجموعة
تم تحديث ملف المستخدم مخصص لمزامنة اسم المستخدم-اللقب
تم مصادقة المستخدم سيتم تشغيله فقط إذا كان مزود المصادقة هو Discord، للتأكد من تنفيذ مزامنة أولى مباشرة بعد ربط الحسابات
Discord
انضم مستخدم إلى خادم Discord سيعمل في قاعدة البيانات بحثًا عن مستخدم يحمل معرف Discord المعطى، ثم سيشغل وظيفة المزامنة
التثبيت
يعتمد هذا الملحق على Discord OAuth2 لتحديد وربط حسابات Discourse-Discord. إذا كنت لا تريد السماح للمستخدمين بتسجيل الدخول عبر Discord، ولكنك ترغب في الحفاظ على ربط الحساب، فراجع حل هذا الموضوع.
المتطلبات المسبقة
يتطلب هذا الملحق libsodium (مطلوب بواسطة مكتبة Discord Ruby). لتثبيته، قم بتعديل ملف .yml الخاص بك وأضف الكود التالي:
discord sync username: إذا كان صحيحًا، فسيتم مزامنة جميع ألقاب خادم Discord مع أسماء المستخدمين في Discourse
discord sync verified role: الدور الذي سيتم إضافته لجميع المستخدمين الذين لديهم حساب Discourse
discord sync safe roles: قائمة بالأدوار التي سيتجاهلها الروبوت وسيتم تحديدها على أنها مُمنَحة يدويًا في Discord
كيفية الاستخدام
لربط الحسابات، إذا كنت تسمح للمستخدمين بالمصادقة عبر Discord، فيمكنهم ببساطة استخدام هذا المزود. إذا لم يكن الأمر كذلك، فسيكون عليهم الذهاب إلى تفضيلات الحساب، والتمرير لأسفل إلى الحسابات المرتبطة والضغط على اتصال في صف Discord.
عرض حي
نحن نستخدم هذا الملحق حاليًا في مثيلة Discourse الخاصة بنا في مجتمع Kodular، مع خادم Discord في kodul.ar/discord:
الشكر والتقدير
Discourse Bot، من إعداد @merefield
شكرًا جزيلاً لـ Robert على توفير الهيكل العظمي لهذا الملحق. لقد ساعد بالتأكيد في تأسيس أساس هذا الملحق بأكمله، مما يسمح بتشغيل روبوت Discord في مثيلة Discourse (وشكرًا له على حيله في تثبيت libsodium!).
Login with Discord، من إعداد فريق Discourse
لن يكون هذا الملحق ممكنًا بدون تكامل Discord OAuth2 (كان ملحقًا سابقًا)، لربط حسابات Discourse و Discord.
Partially enable login option، من إعداد @Falco و @Roman
وشكرًا لـ Falco و Roman على توفير خيار لتمكين مزود تسجيل الدخول فقط لـ “ربط” الحسابات دون فعليًا تمكين خيار المصادقة.
discordrb
يعتمد هذا الملحق على مكتبة discordrb، التي تسمح بالاتصال بـ API Discord باستخدام Ruby.
This is really cool! I’m more of a Telegram fan myself, but Discord is great too! I feel like Telegram would pair well with Discourse, both being well known open-source projects focused on communication.
That would be cool if this had a cross-posting feature. If someone said something in the Discord chat, it would create a reply in a specific Discord thread known as the “chat room thread”. Thus giving your Discourse website an SEO boost because of all the new content within the chat thread.
I also like Telegram a lot, and we were using it with a public chat group. But a few days ago we switched to Discord, because we had over 1k members and it’s quite hard to moderate such a large group. It was easy to do it with Discord with their role system.
In addition to @merefield’s Discord Bot, there’s also a pure OAuth2 (bot free) Discord role <> Discourse group sync plugin (e.g. sync trust level 3 with a Discord role) here
This syncs Discourse -> Discord. However, we rely more on our Discord roles than Discourse groups for identification of stakeholder types, so it would be great if this plugin could also do a Discord -> Discourse sync, i.e. add Discourse users to groups based on their Discord roles, add badges to Discourse users based on their Discord roles, change the Discourse username to match the Discord username (not the other way around), etc.
This looks really cool. The only thing is, how does it match the group on Discord from Discourse? Is it purely by name? If so, could you make it to where we define what group goes to what role by using the role ID from Discord? If not that solution, do you think you could add a role whitelist? I have only a few roles that have groups on Discourse but utilize many roles on Discord.
This particular functionality is so important to us, since we manage all of our roles via Discord. It would be nice to have a way to sync up the groups from Discord to Discourse. Even if they’re only “synced” via name and permissions, etc. are configured after the fact.
@barreeeiroo : do you have any plans for something like this? or have any advice on where to go from here? The manual management of roles via “Safe Roles” is almost good enough. I have roles that have spaces in them and therefore cannot add these into the Safe Roles field. Instead of manually updating all of my roles in discord and adding them without spaces is there another route I can go with?
It would be so nice to have the groups from discord “pushed” to the discourse groups instead, if possible.
Thanks for your work on this plugin!
Edit: The proposal to use Role IDs instead of names would solve a lot of issues on my end for sure.
لا يزال لدي مشاكل في إعداد هذا. بالنسبة للأدوار في Discord، هل يبحث عن معرف (ID) أم اسم؟ أيضًا، بدلاً من “الأدوار المحمية”، هل يمكنك إضافة ميزة تتيح لي مزامنة أدوار محددة فقط؟
لا أعرف لغة Ruby، وإلا لكنت عرضت مساعدتي. ربما سأتعلم الأساسيات أو سأقوم بتنفيذ شيء ما عبر واجهة برمجة التطبيقات (API) باستخدام لغة Java.
هذه هي نقطة هذه الإضافة؟ هل هي معطلة؟ انظر أيضًا إلى إضافة البوت الخاصة بي المرتبطة في المنشور الأصلي والتي تقوم بمزامنة discourse → discord (وإن كان ذلك باستخدام أمر البوت)
لا، إنه مثال إذا كان لديك “منسق مجتمع” في Discourse، فسيؤدي ذلك إلى تغيير دورك في Discord.
ولكن إذا كان لديك “منسق مجتمع” في Discord، فلن يؤدي ذلك إلى تغيير دورك في Discourse.